firefox

python : disable download popup when using firefox with selenium

python : disable download popup when using firefox with selenium Question: I have script that using selenium and firefox to automating download action. The problem is whenever I run script I always get pop up from firefox keep asking what kinds of action I would like to do, even though I set download path in …

Total answers: 3

Selenium – MoveTargetOutOfBoundsException with Firefox

Selenium – MoveTargetOutOfBoundsException with Firefox Question: I’v got problem with function move_to_element on Firefox Webdriver (Chrome, IE works well) driver = webdriver.Firefox() driver.get(“https://stackoverflow.com”) time.sleep(5) source_element = driver.find_element_by_xpath(‘//*[@id=”footer”]/div/ul/li[1]/a’) ActionChains(driver).move_to_element(source_element).perform() I am working with these versions: geckodriver – 0.17.0 // Firefox – 54.0 // selenium – 3.4.3 After running this script, on output shows: selenium.common.exceptions.MoveTargetOutOfBoundsException: Message: (134.96666717529297, …

Total answers: 9

Click button by find_element_by_class_name not working python selenium webdriver NOT working

Click button by find_element_by_class_name not working python selenium webdriver NOT working Question: I’m trying to add contacts on LinkedIn using Python and Selenium. I’m attempting to do so by adding the contact suggestions made by LinkedIn in the “Network” tab (https://www.linkedin.com/mynetwork), which has an infinite scroll feature. Basically I want the script to locate the …

Total answers: 3

Selenium using Python – Geckodriver executable needs to be in PATH

Selenium using Python – Geckodriver executable needs to be in PATH Question: I am going over Sweigart’s Automate the Boring Stuff with Python text. I’m using IDLE and already installed the Selenium module and the Firefox browser. Whenever I tried to run the webdriver function, I get this: from selenium import webdriver browser = webdriver.Firefox() …

Total answers: 36

Adding second instance of Firefox with Marionette (change port)

Adding second instance of Firefox with Marionette (change port) Question: I’m having great difficulties creating two instances of firefox via marionette. Having one instance works fine: Starting up Firefox with marionette enabled: firefox.exe -marionette Controlling it with python: from marionette import Marionette client = Marionette(‘localhost’, port=2828) client.start_session() client.execute_script(“alert(‘o hai there!’);”) Now I’d like to add …

Total answers: 2

How to open console in firefox python selenium?

How to open console in firefox python selenium? Question: Im trying to open firefox console through Selenium with Python. How can I open firefox console with python selenium? Is it possible to send keys to the driver or something like that? Asked By: patricmj || Source Answers: This works: ActionChains(driver).key_down(Keys.F12).key_up(Keys.F12).perform() Without firebug installed at least …

Total answers: 6

Can't turn off images in Selenium / Firefox

Can't turn off images in Selenium / Firefox Question: I am looking to disable images in Firefox when using Selenium. It should be a simple update of the preferences in firefox, which is documented on the instructions on Disable images in Selenium Python However when i run, images display, and when i enter about:config, the …

Total answers: 3

How to set the path to a browser executable with python webbrowser

How to set the path to a browser executable with python webbrowser Question: I am trying to build a utility function to output beautiful soup code to a browser I have the following code: def bs4_to_browser(bs4Tag): import os import webbrowser html= str(bs4Tag) # html = ‘<html> … generated html string …</html>’ path = os.path.abspath(‘temp.html’) url …

Total answers: 2

Setting path to firefox binary on windows with selenium webdriver

Setting path to firefox binary on windows with selenium webdriver Question: I am trying to build a utility function to output beautiful soup code to a browser I have the following code: def bs4_to_browser(data): from selenium import webdriver driver = webdriver.Firefox(path=”F:FirefoxPortableFirefox.exe”) driver.get(“about:blank”) data = ‘<h1>test</h1>’ # supposed to come from BeautifulSoup driver.execute_script(‘document.body.innerHTML = “{html}”;’.format(html=data)) return …

Total answers: 3

Downloading file to specified location with Selenium and python

Downloading file to specified location with Selenium and python Question: Ok so far i have my programing going to the website i want to download link from and selecting it, then the firefox dialogue box shows up and i don’t know what to do. i want to save this file to a folder on my …

Total answers: 3