How to print all html/css tags of a webpage using Selenium:
from selenium import webdriver
browser = webdriver.Firefox()
browser.get('http://seleniumhq.org/')
When I do:
print(browser),
it prints this:
"<selenium.webdriver.firefox.webdriver.WebDriver (session="ce01359c-03e4-499d-a3fb-230bda9ac24c")>"
Is this an Object or variable or a list/set/tuple/dict or what is it? Could someone explain it please?
The result you're getting is an object. In the beginning of your code you chose to call this object browser (a.k.a assigning it to a variable). When you then run the function browser.get() it will not change the content of the variable browser and therefore the result will have nothing to do with the webpage that you're on.