remotewebdriver

How to provide custom capabilities on the selenium server?

↘锁芯ラ 提交于 2019-12-02 09:50:49
I know that some selenium capabilities can be obtained with a method, one of them like this : driver.getCapabilities().getBrowserName(); It returns the value of the browser name. But if it refers to an available method, if I don't misunderstand it, this seems to be related to custom capabilities, like this I mean : driver.getCapabilities().getCapability("something ?"); Returns: The value, or null if not set. So, I've tried to make a simple code to get the value I mean. private RemoteWebDriver driver; private URL url; private DesiredCapabilities dc = new DesiredCapabilities(); @Before public

Remote Webdriver Chrome throws a “path to the driver executable” error

∥☆過路亽.° 提交于 2019-12-01 19:21:36
Hi when i use the following code IWebDriver _webDriver = new RemoteWebDriver(new Uri("http://127.0.0.1:4444/wd/hub"), DesiredCapabilities.Chrome()); I get the follwing error System.InvalidOperationException : The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see http://code.google.com/p/selenium/wiki/ChromeDriver . The latest version can be downloaded from http://code.google.com/p/chromedriver/downloads/list TearDown : System.NullReferenceException : Object reference not set to an instance of an object. at OpenQA.Selenium.Remote

How to instantiate InternetExplorerDriver with Selenium WebDriver using C#

纵然是瞬间 提交于 2019-12-01 15:53:58
new InternetExplorerDriver(); But I could see exception as below: OpenQA.Selenium.DriverServiceNotFoundException was unhandled by user code HResult=-2146233088 Message=The IEDriverServer.exe file does not exist in the current directory or in a directory on the PATH environment variable. The driver can be downloaded at http://code.google.com/p/selenium/downloads/list. Source=WebDriver StackTrace: at OpenQA.Selenium.DriverService.FindDriverServiceExecutable(String executableName, Uri downloadUrl) at OpenQA.Selenium.IE.InternetExplorerDriverService.CreateDefaultService() at OpenQA.Selenium.IE

Maintain and re-use existing webdriver browser instance - java

与世无争的帅哥 提交于 2019-12-01 13:08:18
Basically every time I run my java code from eclipse, webdriver launches a new ie browser and executes my tests successfully for the most part. However, I have a lot of tests to run, and it's a pain that webdriver starts up a new browser session every time. I need a way to re-use a previously opened browser; so webdriver would open ie the first time, then the second time, i run my eclipse program, I want it to simply pick up the previous browser instance and continue to run my tests on that same instance. That way, I am NOT starting up a new browser session every time I run my program. Say you

Error forwarding the new session: Selenium Grid 2

与世无争的帅哥 提交于 2019-12-01 01:20:16
I have taken latest Selenium Server which is 2.45.0 from here . Followed the documentation and started the hub with the following command java -jar selenium-server-standalone-2.45.0.jar -role hub -hubConfig HubConfigFile.json And, the JSon file content is: { "host": 10.5.0.21, "port": 4444, "newSessionWaitTimeout": -1, "servlets" : [], "prioritizer": null, "capabilityMatcher": "org.openqa.grid.internal.utils.DefaultCapabilityMatcher", "throwOnCapabilityNotPresent": true, "nodePolling": 5000, "cleanUpCycle": 5000, "timeout": 300000, "browserTimeout": 0, "maxSession": 5, "jettyMaxThreads":-1 }

Remote webdriver - Passing firefox profile with Rest Client Extension (add-on)

随声附和 提交于 2019-11-30 13:07:12
Currently I am able to send a firefox profile over a RemoteWebDriver, but I am not able to send the RestCLient extension over the profile. I require a certain REST client extension(firefox add-on) to be available for my test case execution. If I run the test case locally using firefox driver it works....but how do I achieve the same thing using RemoteWebDriver? File profileDirectory = new File("c://mach//lib//prof"); FirefoxProfile profile = new FirefoxProfile(profileDirectory); driver = new FirefoxDriver(profile); driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS); Cheers After

Remote WebDriver UnreachableBrowserException: Could not start a new session

删除回忆录丶 提交于 2019-11-30 09:50:14
问题 I got this exception for all browsers. For example, I create a remote webdriver on chrome like this: caps = DesiredCapabilities.chrome(); ChromeOptions options = new ChromeOptions(); options.addArguments("disable-infobars"); caps.setCapability(ChromeOptions.CAPABILITY, options); webDriver = new RemoteWebDriver(new URL("http://myIP:5555/wd/hub"), caps); And I got UnreachableBrowserException as follow: org.openqa.selenium.remote.DesiredCapabilities chrome INFO: Using `new ChromeOptions()` is

Unable to create new remote session

时光毁灭记忆、已成空白 提交于 2019-11-30 08:06:34
问题 How to resolve this issue. Earlier my code was working, but IE settings were reseted by someone. Now I am getting this exception. Started InternetExplorerDriver server (32-bit) 2.53.1.0 Listening on port 16183 Only local connections are allowed Oct 21, 2016 10:14:12 AM org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Attempting bi-dialect session, assuming Postel's Law holds true on the remote end Oct 21, 2016 10:14:12 AM org.openqa.selenium.remote.ProtocolHandshake

UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server with Selenium Grid

会有一股神秘感。 提交于 2019-11-30 07:47:58
问题 Error in opening new driver window: org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure. server log: Forwarding newSession on session null to remote I am running following code on linux: driver= new RemoteWebDriver((new URL( "http://"+ip+":5555/wd/hub")), capability); My hub-node already up and running. Then why i am getting this error. 回答1: This error message... org.openqa

Remote webdriver - Passing firefox profile with Rest Client Extension (add-on)

為{幸葍}努か 提交于 2019-11-29 18:38:51
问题 Currently I am able to send a firefox profile over a RemoteWebDriver, but I am not able to send the RestCLient extension over the profile. I require a certain REST client extension(firefox add-on) to be available for my test case execution. If I run the test case locally using firefox driver it works....but how do I achieve the same thing using RemoteWebDriver? File profileDirectory = new File("c://mach//lib//prof"); FirefoxProfile profile = new FirefoxProfile(profileDirectory); driver = new