firefox

Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided using GeckoDriver

Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided using GeckoDriver Question: from selenium import webdriver; browser= webdriver.Firefox(); browser.get(‘http://www.seleniumhq.org’); When I try to run this code, it gives me an error message: Expected browser binary location, but unable to find binary in default location, no ‘moz:firefoxOptions.binary’ capability provided, …

Total answers: 10

How to change firefox profile preference after defining webdriver using Selenium and Python

How to change firefox profile preference after defining webdriver using Selenium and Python Question: How to change profile preference after defining driver? profile = webdriver.FirefoxProfile() driver = webdriver.Firefox(firefox_profile=profile) After some code need to set useragent profile.set_preference("general.useragent.override", ua) How to set it without defining new driver? Asked By: Tomain || Source Answers: I believe it’s not …

Total answers: 3

WebDriverException: Message: Exception… "Failure" nsresult: "0x80004005 (NS_ERROR_FAILURE)" while saving a large html file using Selenium Python

WebDriverException: Message: Exception… "Failure" nsresult: "0x80004005 (NS_ERROR_FAILURE)" while saving a large html file using Selenium Python Question: I’m scrolling through the Google Play Store and the reviews for an app, specified by the URL to the app page. Selenium then finds the reviews and scrolls down to load all reviews. The scrolling part works, without …

Total answers: 1

How to get the url or filename being downloaded now?

How to get the url or filename being downloaded now? Question: After click the button, how to know the downloading url(with the filename), or how to know the filename(complete with extension) being downloaded? One problem is, e.g. the downloaded file some have .csv extension, some without. e.g. I would like to rename it unified. (pls. …

Total answers: 2

Batch file not running python script in task scheduler

Batch file not running python script in task scheduler Question: I have a scraping python script and a batch file that when run from CMD works perfectly however when I try to run it from Task Scheduler nothing happens. I know there are a lot of questions regarding the same issue but I have tried …

Total answers: 1

Python Selenium Firefox – how to enable headless-mode as part of a class/object?

Python Selenium Firefox – how to enable headless-mode as part of a class/object? Question: I have the following code: options = Options() options = options.set_headless( headless=True) class Sel_Driver(): def __init__(self): self.driver = webdriver.Firefox(firefox_options=options) I can then use self.driver.get(url) as part of a method to open urls I feed in. This works – I can feed …

Total answers: 2

WebDriverException: Message: invalid argument: can't kill an exited process with GeckoDriver, Selenium and Python on RaspberryPi3

WebDriverException: Message: invalid argument: can't kill an exited process with GeckoDriver, Selenium and Python on RaspberryPi3 Question: Server: Raspberry Pi 3 OS: Dietpi – version 159 Geckodriver version: 0.22 for arm Firefox version: 52.9.0 Python version: 3.5 Selenium version: 3.14.1 Gecko is executable, and is located in /usr/local/bin/ from selenium import webdriver from selenium.webdriver.common.by import …

Total answers: 11

selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities with Firefox 46 through Selenium

selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities with Firefox 46 through Selenium Question: I must have some versions here that don’t match up since I can’t get Selenium with Python to fire up a Firefox web browser. I’m using an older version of Firefox because other people in here have the same …

Total answers: 7

Selenium get_attribute("id")

Selenium get_attribute("id") Question: I am scraping in Python using Selenium and Firefox. I am able to get my href’s into an object using the following: HREF = node.find_elements_by_xpath(".//a") # Get the href’s under the current node Which returns a bunch of <a> tags that look like this: <a href="http://example.com" class="" title="The Link" data-ipshover="" data-ipshover-target="http://example.com/?preview=1" data-ipshover-timeout="1.5" …

Total answers: 1