selenium-chromedriver

Change browser preferences in runtime?

倖福魔咒の 提交于 2019-12-06 11:58:32
问题 Can we change browser preferences in runtime? Is there any possibility to changes the browser preferences set before launching the browser during execution programmatically? Example: I have set the following preferences before launching the driver firefoxProfile.setPreference("pdfjs.disabled", true); firefoxProfile.setPreference("plugin.scan.plid.all", false); firefoxProfile.setPreference("plugin.scan.Acrobat", "99.0"); I want to change the preference to : firefoxProfile.setPreference("pdfjs

Customize Chrome webdriver using selenium to save files without prompting to save or discard files when downloading

依然范特西╮ 提交于 2019-12-06 11:58:12
问题 I am trying to automate downloading files using selenium with chrome as my browser using chromedriver. When i try downloading exe files its prompting me "This type of file can harm your computer, Discard or save it". i want it to download anyway without any prompt. I have looked into few solutions like below: chromeOptions = webdriver.ChromeOptions() prefs = {"browser.helperApps.alwaysAsk.force" :False,"browser.helperApps.neverAsk.saveToDisk" : "application/octet-stream"} chromeOptions.add

ChromeDriver user preferences ignored

这一生的挚爱 提交于 2019-12-06 11:23:50
I'm using Selenium webdriver 3.3 and ChromeDriver 2.28 (32bit). My slave machine is Windows 7 running Chrome 57. When Chrome starts I am trying to use ChromeOptions over RemoteWebDriver to disable the "save your password" pop-up using the parameter "password_manager_enabled". However, it seems to have no effect at all. I have tried many variations around ChromeOptions, JSON strings and simple strings but all to no avail. ChromeOptions cOpt = new ChromeOptions(); cOpt.addUserProfilePreference("profile.password_manager_enabled", false); var capabilities = chromeOpts.ToCapabilities() as

Selenium 3.0.1 Chrome Node configuration

别说谁变了你拦得住时间么 提交于 2019-12-06 09:26:27
Selenium 3.0.1 update is throwing an error while invokeing the node through Json Config File. Please find the following details from the Json file. { "capabilities": [ { "browserName": "chrome", "maxInstances": 5, "seleniumProtocol": "WebDriver" } ], "configuration": { "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy", "maxSession": 5, "port": 5559, "host": ip, "register": true, "registerCycle": 5000, "hubPort": 4445, "hubHost":ip, "hub":"http://XX.XX.XX.XX:XXXX/grid/register", "timeout":600000, "browserTimeout":600000" } } Error - Error with Json of Config : Depricated node config

What is difference between Xvfb and Chromedriver and when to use them

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 09:23:16
Hi I am planning to setup selenium to test my web application. I have read that both chromedriver and Xvfb can be used to run the tests. I have also read that Xvfb can be configured to use chromdriver. So that got me confused. What role does chromedriver and Xvfb in runnning the selenium tests. Thanks Naveen Kumar R B chromedriver - to run tests on chrome browser (with GUI). Xvfb - to run tests in headless mode. can be any browser including chrome (Browser GUI won't be displayed, so you can use the machine for some other operations). code snippets (python): Chrome Driver (download here ):

Avoid re-entering user/email and password with WebDriverIO in login form

岁酱吖の 提交于 2019-12-06 09:22:45
I'm looking for someone to tell me how can I avoid to re-enter everytime the username and password when I run a Testdrive with webdriverIO using the chromedriver and selenium. What I want is to optimize my testdrive. Some clue??? this two file are parts of one module and there is 4 modules in the system first file: var name = 'Andrea' + Math.floor((Math.random() * 1000000) + 1); var ssn = 'V-' + Math.floor((Math.random() * 1000000) + 1); var url = 'http://someurl.com'; var new_contact = 'https://someurl.com/client/add'; describe('Some contact is create', function(){ it('Should login to the

Explicit waits in Selenium C# doesn't work . What is wrong?

有些话、适合烂在心里 提交于 2019-12-06 08:54:41
问题 So I have this issue with explicit waits. I don't want to use Thread.Sleep(). This is an simple test which it opens a page and then goes back and forward. It takes about 2-3 seconds to load this page and I want to do this in a dynamic way (testing). Hope I am not too confusig. I did a lot of research but nothing works, maybe I am doing something wrong. ( I'm using Resharper to run unit tests) Here I have also the solution: https://www.dropbox.com/s/1k5vjc5czvmdd3u/ConsoleApplication2.rar?dl=0

Is there a way to determine if an element is clickable in Chrome Browser using Selenium and Watir?

跟風遠走 提交于 2019-12-06 07:22:34
As I understand it, this question is really only relevant when performing web test automation using Chrome browser due to the manner in which a click event is implemented with Selenium Webdriver and Chromedriver. To preface, I use and am aware of finding an element through the use of the Watir element function "present?", which as I understand is essentially a combination of "visible?" and "exists?". I could also, at need find an element with Webdriver element functions to identify if an element is present with a rescue for an exception if it is not. What I am trying to determine is the

How to access a site via a headless driver without being denied permission

有些话、适合烂在心里 提交于 2019-12-06 06:35:32
问题 I am trying to retrieve the html code of a site using a headless chrome driver. However I get a "permission denied" message. If I use a "regular" driver it all works fine. Is there any way to bypass that? It's my first post so I do apologize for any potential mistakes in formatting from selenium import webdriver #Headless driver chrome_options = webdriver.ChromeOptions() chrome_options.add_argument('--headless') chrome_options.add_argument('--no-sandbox') driver1 = webdriver.Chrome(executable

WebDriverError error: Chrome failed to start: exited abnormally

放肆的年华 提交于 2019-12-06 06:31:38
问题 I'm trying to run protractor test on ubuntu 14.04 vm (by google cloud), for some reason when i run 'protractor conf.js' i get an error says: E/launcher - WebDriverError: unknown error: Chrome failed to start: exited abnormally I followed this tasks in order to install headless chrome: https://gist.github.com/alonisser/11192482 Before running protractor cons.js, i'm running "webdriver-manager start" When i run 'Xvfb -ac :2 -screen 0 1280x1024x16' its freeze when gets to 'Initializing built-in