geckodriver

Selenium problems with PDF download in Firefox

…衆ロ難τιáo~ 提交于 2021-02-19 07:15:27
问题 I'm working on an upgrade of our internal Java Selenium framework to the latest version 3.14.0 in combination with Firefox 61.0 and Geckodriver 0.21.0. I face problems when it comes to an automated download of a PDF file with Firefox. For example at this link there is a download button where I can let selenium perform a click on. Instead of downloading the pdf, a built-in viewer will be opened. The preference pdfjs.disabled should deactivate the viewer so created the driver instance with a

Why is my containerized Selenium application failing only in AWS Lambda?

懵懂的女人 提交于 2021-02-19 05:53:47
问题 I'm trying to get a function to run in AWS Lambda that uses Selenium and Firefox/ geckodriver in order to run. I've decided to go the route of creating a container image, and then uploading and running that instead of using a pre-configured runtime. I was able to create a Dockerfile that correctly installs Firefox and Python, downloads geckodriver , and installs my test code: FROM alpine:latest RUN apk add firefox python3 py3-pip RUN pip install requests selenium RUN mkdir /app WORKDIR /app

504 Gateway Time-out error using Firefox 68.9.0esr in headless mode with GeckoDriver Selenium and Python

元气小坏坏 提交于 2021-02-16 20:35:08
问题 I made a container image with selenium. I used a ubi image from RedHat as base image. I installed the following versions of the geckodriver and Mozilla Firefox geckodriver 0.26.0 (e9783a644016 2019-10-10 13:38 +0000) Mozilla Firefox 68.9.0esr I can run a selenium test on firefox successfully. When I run a headless test, something goes wrong: Traceback (most recent call last): File "./selenium-test.py", line 58, in <module> check_browser("FIREFOX") File "./selenium-test.py", line 26, in check

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

Deadly 提交于 2021-02-15 07:14:37
问题 I am trying to get back into using python webdriver. I have here the code from selenium import webdriver driver = webdriver.Firefox(executable_path=r'C:\Users\Cody\Downloads\geckodriver.exe') driver.get('http://inventwithpython.com') This causes: C:\Users\Cody\Projects>python accounting.py Traceback (most recent call last): File "accounting.py", line 4, in <module> driver = webdriver.Firefox(executable_path=r'C:\Users\Cody\Downloads\geckodriver.exe') File "C:\Users\Cody\AppData\Local\Packages

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

牧云@^-^@ 提交于 2021-02-15 07:11:26
问题 I am trying to get back into using python webdriver. I have here the code from selenium import webdriver driver = webdriver.Firefox(executable_path=r'C:\Users\Cody\Downloads\geckodriver.exe') driver.get('http://inventwithpython.com') This causes: C:\Users\Cody\Projects>python accounting.py Traceback (most recent call last): File "accounting.py", line 4, in <module> driver = webdriver.Firefox(executable_path=r'C:\Users\Cody\Downloads\geckodriver.exe') File "C:\Users\Cody\AppData\Local\Packages

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

有些话、适合烂在心里 提交于 2021-02-13 17:30:54
问题 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, and no binary flag set on the command line. Any thoughts-highly appreciated! 回答1: This error message... Expected browser binary location, but unable to find binary in default location, no 'moz

Firefox(headless)+selenium cannot access internet from docker container

泄露秘密 提交于 2021-02-11 14:02:30
问题 I have tested the internet connection by wget https://www.google.com and it worked from inside the docker. But, when I run a headless firefox with selenium python binding, selenium throughs the TimeoutException : >> docker run myselcontainer Traceback (most recent call last): File "run.py", line 24, in <module> driver = webdriver.Firefox(service_log_path=os.devnull, options=options, capabilities=capabilities, firefox_profile=profile) File "/usr/local/lib/python3.8/site-packages/selenium

Cannot use Private Socks5 proxy with Selenium+Firefox (Python)

你。 提交于 2021-02-11 13:51:53
问题 Context: I am using Python, selenium + Geckodriver. Firefox webbrowser automation and I have problem on a private proxy authentification. I cannot manage to configure my socks5 proxy username and password. Thus, Firefox shows up but connection doesnt work. The simple task that I want to do is : I want to use selenium(automated Firefox) with a proxy (SOCKS5 proxy with password) Checking my IP on a website to see if the proxy is working What I noted so far is: I am using Firefox V76.0.1 ,

Python Selenium 4 - Firefox FirefoxBinary() Deprecated

爱⌒轻易说出口 提交于 2021-02-10 21:16:35
问题 I have upgraded to Selenium 4 new_binary_path = FirefoxBinary('path_to_binary') selenium.webdriver.Firefox(executable_path=path, options=ops, firefox_binary=new_binary_path) or options.add_argument("--setBinary(path_to_binary)") selenium.webdriver.Firefox(executable_path=path, options=ops) Return this error message DeprecationWarning: executable_path has been deprecated, please pass in a Service object Documentation https://github.com/SeleniumHQ/selenium/blob/master/javascript/node/selenium

Selenium: “Failed to Decode Response from Marionette”

允我心安 提交于 2021-02-10 20:50:40
问题 I've seen this issue around, but, unfortunately, I have struggled to find a definite resolution. Perhaps, if someone has it working for themselves, they could share what firefox and geckodriver combination they have it working with. Edit: I am running this through Jenkins, so maybe there is an embedded firefox in Jenkins that this is using, which differs from that on the server, itself. For myself, I am using: Centos 7 Mozilla Firefox 67.0 GeckoDriver version 0.26.0 (for linux64; downloaded