selenium-chromedriver

Selenium with chromedriver gives different results based on “headless” argument

强颜欢笑 提交于 2019-12-22 12:24:07
问题 I have been playing around with Selenium + Chromedriver and I noticed I get different results based on if headless is enabled or disabled. After some investigation I found out that "headless" does not include the Accept-Language header. Is there anyway to manually add this in the headers? 回答1: That's what Google chrome does. One way around it would be to use a proxy and modify the headers for you. Or you can use the Firefox driver as that driver does not send different headers when using the

Chrome version 44 has some issue with selenium test

馋奶兔 提交于 2019-12-22 11:02:32
问题 I am using Selenium and Chrome to write a test, yesterday when my Chrome updated from 43 to 44 my test got some problems with action.sendkey("arrow.down") and etc. I tried to uninstall Chrome and install Chrome 43 but as soon as I do it updates its self to 44 !!! I also tried chromedriver 2.16 but it did not work too. How can I fix it? 回答1: This is related to Keys.ENTER, Keys.TAB, Keys.SPACE are not working on Chrome 44 and Input.dispatchKeyEvents handles some keys incorrectly. The problem

Change download location and name for each file

本小妞迷上赌 提交于 2019-12-22 10:41:01
问题 I'm doing an automation using Selenium with Chrome WebDriver. The application has to do a series of downloads that need to be saved with different names (Data + Report type) and folders that match the type of report I'm downloading. The problem is that I can only set the default directory when I instantiate a new driver var chromeOptions = new ChromeOptions(); chromeOptions.AddUserProfilePreference("download.default_directory", downloadDirectory); chromeOptions.AddUserProfilePreference("intl

Install specific chromedriver for protractor

廉价感情. 提交于 2019-12-22 10:10:57
问题 I am having an issue with chrome driver that runs on the CircleCi. The problem is that when running: ./node_modules/.bin/webdriver-manager update and then checking the version of chromedriver and selenium with the command: ls -lt node_modules/protractor/selenium it shows the latest versions are: selenium-server-standalone-2.45.0.jar chromedriver chromedriver_2.15.zip According to the npm.taobao.org note ChromeDriver version 2.15 supports Chrome v40-43. But CicleCi documentation says that it

Does chrome chrome driver support PageLoadStrategy='eager' for Selenium?

▼魔方 西西 提交于 2019-12-22 08:38:48
问题 I'm trying to scrape some stuff using Selenium/headless chrome. In some pages, the driver will not move to the next step until the full page is loaded (even though the relevant elements are present). I tried setting the pageLoadStrategy capability like so: caps = Selenium::WebDriver::Remote::Capabilities.chrome("chromeOptions" => {"args" => [ "--headless" ]}) caps['pageLoadStrategy']='eager' self.driver||=Selenium::WebDriver.for :chrome, :desired_capabilities => caps I get the following error

Selenium/ChromeDriver Unknown policy Errors

无人久伴 提交于 2019-12-22 06:27:54
问题 I am currently using Python (v3.5.1), Selenium (v3.7), and Chromedriver (v2.33). When I run the following command: from selenium import webdriver driver = webdriver.Chrome('C:\Program Files\ChromeWebdriver\chromedriver.exe') I get the following messages: [2440:4356:1115/112221.822:ERROR:configuration_policy_handler_list.cc(92)] Unknown policy: PasswordManagerAllowShowPasswords [2440:4356:1115/112221.822:ERROR:configuration_policy_handler_list.cc(92)] Unknown policy: SkipMetadataCheck [2440

Getting java.lang.IllegalStateException even after adding set property webdriver

徘徊边缘 提交于 2019-12-22 05:53:57
问题 I am getting Exception: in thread "main" java.lang.IllegalStateException:The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html at com.google.common.base.Preconditions.checkState(Preconditions.java:199) at org.openqa.selenium.remote.service.DriverService.findExecutable

Embedding Selenium ChromeDriver in Windows Form

你离开我真会死。 提交于 2019-12-22 04:43:38
问题 I'd like to embed the Selenium ChromeDriver within a Windows Form panel. I've successfully followed this example for embedding notepad in a Windows Form. I think the problem where I am having trouble is getting the MainWindowHandle from the ChromeDriver . Here's what I've got so far: (pastebin link of full code: https://pastebin.com/RNv2vbJ1) //----------------------TEST--------------------- ChromeDriverService service = ChromeDriverService.CreateDefaultService(); service

Protractor webdriver-manager chromedriver update

拥有回忆 提交于 2019-12-22 04:34:10
问题 There seems to be a issue with chromedriver 2.2 and the newest version of Chrome. This issue has to deal with the protractor not being able to send tab keys with 2.2. If I do webdriver-manager update, it does not update to the chromedriver 2.4. I did a hack where I downloaded chromedriver 2.4 exe myself and manually put it in the selenium folder, but that is not the best way to do this. How do you update protractor to use the latest version of Chromedriver 2.4? 回答1: I am having the same issue

unknown error: failed to write prefs file

六眼飞鱼酱① 提交于 2019-12-22 04:22:15
问题 I keep getting the error while running functional tests using runner with following: -selenium 2.44 -Chrome Driver -Windows Server 2008 R2 Enterprise Error Description: Listening on 0.0.0.0:7000 Starting tunnel... UnknownError: [POST http://test.com/wd/hub/session / {"de siredCapabilities":{"browserName":"chrome","name":"tests/intern","idle-timeout": 60,"selenium-version":"2.44.0"}}] unknown error: failed to write prefs file (Driver info: chromedriver=2.12.301325