Python Forum

Full Version: open a web page by selenium !!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hello folks ... i hope all okay ?

i try to visit a website via selenium but it did not work :

from selenium import webdriver
qassam = ""

dev = webdriver.Firefox()

it just open my browser not visited the website ??
and is there anyway to hide the browser ?

ps: my os is Linux evilcode1 4.4.0-130-generic #156~14.04.1-Ubuntu SMP Thu Jun 14 13:51:47 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
(Jul-30-2018, 10:58 AM)Larz60+ Wrote: [ -> ]Use the headless option, see:
not working when i run the code its juts open my browser without doing anything
That's the old way webdriver.Firefox() Firefox has messed it up some with DesiredCapabilities
And marionette can be True or False based on Firefox version.
This work for me,this setup is also in link over in my tutorial.
Now do i have geckodriver is folder as scripts.
from selenium import webdriver

#-- FireFox
caps = webdriver.DesiredCapabilities().FIREFOX
caps["marionette"] = True
browser = webdriver.Firefox(capabilities=caps)
url = ""
Chrome is easier.
from selenium import webdriver

#-- Chrome
browser = webdriver.Chrome()
url = ""