selenium-chromedriver

unknown error: chrome failed to start

两盒软妹~` 提交于 2019-12-17 20:31:57
问题 I've been stuck for days because of this issue and can't seem to find a solution. I can't get the chromedriver to work on my machine, no matter what I do. I've tried pretty much every setup I could possibly imagine. To list a few: Chrome 64 bits, Python 64 bits Chrome 32 bits, Python 32 bits Chrome 64 bits, Python 32 bits Chrome 32 bits, Python 64 bits I've also tried different versions of Chrome with their corresponding chromedriver versions. I've tried different prior versions of selenium,

Set Selenium ChromeDriver UserPreferences to Save as PDF

强颜欢笑 提交于 2019-12-17 20:01:11
问题 I am using ChromeDriver 2.33 and am using kiosk printing to automatically click the Print button on the Print Preview dialog however it is sending the document to the printer instead of PDF. I have attempted the solution at this stack overflow question to no avail. Here is the code I am using: ChromeOptions o = new ChromeOptions(); o.AddArgument("--kiosk-printing"); o.AddUserProfilePreference("printing.print_preview_sticky_settings.appState", "{\"version\":2,\"isGcpPromoDismissed\":false,\

How to close a ChromeDriver when running on Grid?

◇◆丶佛笑我妖孽 提交于 2019-12-17 19:51:57
问题 I am currently running my tests with RemoteWebDriver with Selenium Grid 2 through TestNG suites. This works fine with Firefox and IE. Now I added Chrome and the tests run fine, but I always get an Exception when calling driver.quit() after all tests of a suite (works fine for FF and IE). The Exception looks like this: Error communicating with the remote browser. It may have died. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl

Python selenium webdriver “Session not created” exception when opening Chrome

半城伤御伤魂 提交于 2019-12-17 19:28:03
问题 Here's my code for opening Chrome: from selenium import webdriver driver=webdriver.Chrome('C:\\Users\\Imran\\AppData\\Local\\Programs\\Python\\Python36\\selenium\\chromedriver.exe') Error when running program: Traceback (most recent call last): File "C:/Users/Imran/PycharmProjects/webscrapping/WF Item.py", line 6, in <module> driver = webdriver.Chrome('C:\\Users\\Imran\\AppData\\Local\\Programs\\Python\\Python36\\selenium\\chromedriver.exe') File "C:\Users\Imran\AppData\Local\Programs\Python

How to start ChromeDriver in headless mode

一曲冷凌霜 提交于 2019-12-17 17:32:32
问题 I want to try out headless chrome, but I am running into this issue, that I can't start the driver in headless mode. I was following google documentation. am I missing something ? The code execution gets stuck in var browser = new ChromeDriver(); line Here is my code: var chromeOptions = new ChromeOptions { BinaryLocation = @"C:\Users\2-as Aukstas\Documents\Visual Studio 2017\Projects\ChromeTest\ChromeTest\bin\Debug\chromedriver.exe", DebuggerAddress = "localhost:9222" }; chromeOptions

'list' object has no attribute 'get_attribute' while iterating through WebElements

て烟熏妆下的殇ゞ 提交于 2019-12-17 17:13:36
问题 I'm trying to use Python and Selenium to scrape multiple links on a web page. I'm using find_elements_by_xpath and I'm able to locate a list of elements but I'm having trouble changing the list that is returned to the actual href links. I know find_element_by_xpath works, but that only works for one element. Here is my code: path_to_chromedriver = 'path to chromedriver location' browser = webdriver.Chrome(executable_path = path_to_chromedriver) browser.get("file:///path to html file") all

java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkState(ZLjava/lang/String;) with Selenium, gradle and ChromeDriver

会有一股神秘感。 提交于 2019-12-17 17:05:38
问题 I am trying to use Selenium api with Gradle. This is my build.gradle dependency section: dependencies { compile 'com.google.api-client:google-api-client:1.23.0' compile 'com.google.oauth-client:google-oauth-client-jetty:1.23.0' compile 'com.google.apis:google-api-services-sheets:v4-rev506-1.23.0' compile group: 'org.seleniumhq.selenium', name: 'selenium-java', version: '2.9.0' compile group: 'org.seleniumhq.selenium', name: 'selenium-chrome-driver', version: '2.9.0' } My selenium - Java code:

WebDriverException: java.net.ConnectException: Failed to connect to localhost error with Selenium 3 and chromedriver on MacOS

荒凉一梦 提交于 2019-12-17 16:48:29
问题 Hi I have this weird issue. I am not able to run tests with chromedriver on my Mac. I have searched every possible corner here and none seems to help. My browser is launched, but it freezes just before the driver.get(url) is called. My environment: MacOS High Sierra, Latest chromedriver as of 12March 2018, Latest selenium 3.10, Latest TestNG 6.14 My code: public class Temp { @Test() public void test1() { System.setProperty("webdriver.chrome.driver", "src/test/resources/chromedriver");

Selenium & Heroku: urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

半城伤御伤魂 提交于 2019-12-17 13:58:21
问题 Setup: selenium : 3.141.0 python : 3.6.7 heroku-stack : heroku-18 headless-chrome : v71.0.3578.80 buildpack installed chromedriver : v2.44.609551 buildpack installed I'm getting this error when using selenium in heroku: urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) I googled but didn't have luck. The error happens at the last line of this code. Code from selenium import webdriver from selenium.common.exceptions import

Selenium & Heroku: urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

时间秒杀一切 提交于 2019-12-17 13:57:12
问题 Setup: selenium : 3.141.0 python : 3.6.7 heroku-stack : heroku-18 headless-chrome : v71.0.3578.80 buildpack installed chromedriver : v2.44.609551 buildpack installed I'm getting this error when using selenium in heroku: urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) I googled but didn't have luck. The error happens at the last line of this code. Code from selenium import webdriver from selenium.common.exceptions import