selenium-chromedriver

What is python's equivalent of useAutomationExtension for selenium?

我只是一个虾纸丫 提交于 2019-12-19 04:04:18
问题 I am trying to run a basic selenium script from my office environment, which has a proxy and firewall setup. The script is running fine except before every execution it gives a popup saying "Loading of unpacked extensions is disabled by administrator." Which means I'll have to manually click it to proceed and that defies the purpose of automation. I googled and stackoverflowed the error and looks like there is a chrome option useAutomationExtension that needs to be disabled. I went on search

How to change chrome browser language in selenium automation

限于喜欢 提交于 2019-12-19 04:03:14
问题 I want to automate localization functions of a web application. According to my application when the browser language changes, application language should change automatically according to the browser language. How to do that? 回答1: Set the language code in chrome options before launching the the driver as shown below. System.setProperty("webdriver.chrome.driver","<PATH>/chromedriver.exe"); ChromeOptions chromeoptions = new ChromeOptions(); // for japanese language chromeoptions.addArguments("

Google Chrome unable to navigate to specified URL when triggered from Selenium

拈花ヽ惹草 提交于 2019-12-19 03:45:39
问题 I have an automation framework developed around Selenium-WebDriver which launches Chrome and navigates to specified URL and performs specified automation. When I commissioned the framework to perform a long task and left it overnight to run (Run was not successful). The following day when I tried to re-run a new set of Tests, Selenium was able to fire Chrome but the Browser would not navigate to the specified URL. The following is the detailed stack trace. Starting ChromeDriver (v2.7.236900)

How to fix “invalid argument: invalid 'expiry'” in Selenium when adding cookies to a chromedriver?

纵饮孤独 提交于 2019-12-19 03:36:21
问题 I'm trying to add cookies to a browser, but getting the following error: Message: invalid argument: invalid 'expiry' (Session info: chrome=75.0.3770.90) This code shows how I load and add cookies. for cookie in pickle.load(open(r'{0}\{1}_cookie.pkl'.format(settings.COOKIES_PATH, self.tv_username), 'rb')): self.browser.add_cookie(cookie) Values of the cookies: {'__utmc': '226258911', '_sp_id.cf1a': '0b243b32-8dee-46d9-a243-bb4d2bfcb805.1560942815.1.1560942821.1560942815.5941cbc0-0500-4a17-8f6c

'selenium.common.exceptions.WebDriverException: Message: u'chrome not reachable

可紊 提交于 2019-12-19 02:07:23
问题 I'm using webdriver to config a router, but when I run script: from selenium import webdriver self.driver = webdriver.Chrome() It opens chrome and no response, and then raise exception: chrome not reachable. My computer has two network cards, when I forbbiden one, it works well. I don't konw why, please help! 回答1: In pure case "chrome not reachable" means that Chrome binary can be started but debugging port is not reachable. Debugging port is set by argument: --remote-debugging-port=12582 In

Disable images in Selenium Google ChromeDriver

梦想的初衷 提交于 2019-12-18 19:05:14
问题 How does one disable images in Google chrome when using it through Selenium and c#? I've attempted 6 ways and none worked. I've even tried the answer on this StackOverflow question, however I think the info in it is out of date. Chrome driver: V2.2 Chrome version: V29.0.1547.66 m Selenium: V2.35 All the attempts I've made don't cause exceptions, they run normally but still display images: Attempt 1: ChromeOptions co = new ChromeOptions(); co.AddArgument("--disable-images"); IWebDriver driver

Node.js require without storing it into a variable

纵饮孤独 提交于 2019-12-18 19:02:25
问题 I have the following code snippet and it works in its context. "use strict"; require('chromedriver'); var selenium = require('selenium-webdriver'); var driver = new selenium.Builder() .forBrowser('chrome') .build(); What I don't understand is the line: require('chromedriver'); If i remove it I get an error: Error: The ChromeDriver could not be found on the current PATH. Please download the latest version of the ChromeDriver from http://chromedriver.storage.googleapis.com/index.html and ensure

Selenium standalone server not starting

我们两清 提交于 2019-12-18 13:40:12
问题 I'm running into trouble while starting selenium standalone server on my VPS root@PIV:/usr/share/nginx/pivdev/tests# java -jar selenium-server.jar Output: 21:53:08.857 INFO - Launching a standalone Selenium Server 21:53:08.911 INFO - Java: Oracle Corporation 24.79-b02 21:53:08.914 INFO - OS: Linux 3.13.0-52-generic amd64 21:53:08.945 INFO - v2.47.1, with Core v2.47.1. Built from revision 411b314 21:53:09.070 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is

How can we disable web security of chrome browser using selenium/TestNg [duplicate]

杀马特。学长 韩版系。学妹 提交于 2019-12-18 13:25:52
问题 This question already has answers here : Chrome arguments doesn't work (3 answers) Closed 4 years ago . I want to use the following command using selenium/testng inside my code since every-time I execute the code, a new instance of browser is created by webdriver in which security is enabled by default. chrome.exe --disable-web-security 回答1: Try something this, Change the path and slashing accoding to your specifications :- WebDriver driver=null; System.setProperty("webdriver.chrome.driver","

selenium inside windows docker container fails with ff/chrome “session deleted because of page crash”

最后都变了- 提交于 2019-12-18 12:53:11
问题 DOCKER WITH SELENIUM AND ASP.NET 4.5 MVC What am I trying to do? Attempting to have a docker image that does following. Yes, I'm aware there are other ways to accomplish the end game here but I have a specific request on this. Runs an ASP.NET MVC 4.5 web app Has selenium driver via a c# console exe testing the code Current status - when test is run in regular Windows 10 or Windows 2016 it runs fine. When the test is run in a Windows docker container it blows out with " session deleted because