selenium-chromedriver

How to set browser window size for Chrome and Opera launched by Selenium WebDriver in incognito/private mode?

跟風遠走 提交于 2019-12-08 02:20:24
问题 I'm working on application which will execute tests on multiple browser types (Chrome, FireFox, Internet Explorer and Opera). I found the way how to launched them in incognito/private modes (How to open incognito/private window with Selenium WD for different browser types?) and set window size (Browser window control #174): Window window = driver.manage().window(); window.setPosition(new Point(0, 0)); window.setSize(new Dimension(width, height)); But this code does not work in all cases: +---

Selenium 3.0.1 Chrome Node configuration

戏子无情 提交于 2019-12-08 02:15:33
问题 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",

How to use webdriver mobile web on desktop browser

不羁岁月 提交于 2019-12-08 01:14:31
问题 I am using selenium webdriver for functional test automation of AUT (Application Under Test). AUT is responsive web and i am almost done with different test case for desktop browser. Now the same test cases are applicable for mobile browser as well because the AUT can be accessed from mobile browser. As it is responsive web when we open in mobile browser the UI has some different representation. So we need to run those test for mobile browsers as well. For manual testing team using safari

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

夙愿已清 提交于 2019-12-08 00:15:12
问题 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 回答1: 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

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

大兔子大兔子 提交于 2019-12-07 23:05:19
问题 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 =

How to close all the windows before the next test in a test suite?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-07 22:34:37
问题 [7] pry(#<RSpec::Core::ExampleGroup::Nested_1>)> page.execute_script "window.close()" Selenium::WebDriver::Error::NoSuchWindowError: Script execution failed. Script: window.close(); The window could not be found [8] pry(#<RSpec::Core::ExampleGroup::Nested_1>)> page.driver.browser.window_handles => ["f1-2"] I had a browser open with two tabs, the above command does close one but the last tab never closes. It is open but when I try to run page.execute_script "window.close()" it gives the above

Script running on chrome showing errors

◇◆丶佛笑我妖孽 提交于 2019-12-07 19:10:29
问题 I used steps to run chrome script provided on this links its showing error I Installed chrome driver as steps suggested in below link but its not working https://github.com/zeljkofilipin/watirbook/blob/master/installation/windows.md#chrome-with-watir-webdriver My PC configuration Win 7 & 64bit C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.0.9-x86-mingw32/lib/ffi/platform.rb:27 : Use RbConfig instead of obsolete and deprecated Config. Started ChromeDriver port=54035 version=20.0.1133.0 log=D:

How to programmatically set download path in Protractor?

 ̄綄美尐妖づ 提交于 2019-12-07 18:23:20
问题 I am trying to dynamically set the Chrome download path in conf.js for Protractor. Our webservice exports a file and I am writing a test that needs to know where the download file is going to be in order to verify it. Right now, I am hard setting the browser's download path. The problem is that other members of my team and the build machines will also be running this test and there is no single download path I could choose that would work on every dev and build machine. After doing some

Get Emulator list from Chrome

北战南征 提交于 2019-12-07 18:02:02
问题 As per ChromeDriver site, the user can use the emulators created/present in the chrome for Selenium execution. Detailed View Here. I wanted to display all the created/available emulators from Chrome . Chrome could be storing that details in some json file or something.If so how to access it and print it in Java 回答1: Did a Notepad++ Find in Files and found it. The data is stored in JSON format in file C:\Users\Your UserName\AppData\Local\Google\Chrome\User Data\Default\Preferences Under Key

Run WebDriver with Chrome Canary?

醉酒当歌 提交于 2019-12-07 13:40:31
问题 Is there a way to tell chromedriver (the webdriver implementation within Chrome) to use Canary, Beta or current production chrome? 回答1: You can ask ChromeDriver to use a Chrome executable in a non-standard location ChromeOptions options = new ChromeOptions(); options.setBinary("/path/to/other/chrome.exe"); On Mac OS X, this should be the actual binary, not just the app. e.g., /Applications/Google Chrome.app/Contents/MacOS/Google Chrome . [via chromedriver Capabilities and Switches] 回答2: And