remotewebdriver

Bind Phantomjs to a Network Interface

喜你入骨 提交于 2020-01-17 03:44:30
问题 I currently have multiple network alias (eth0, eht0:1, eth0:2), each having their own private ip which has its own public ip. When using remote web driver with phantomjs (ghostdriver), it always chooses the local host (See BUG https://github.com/ariya/phantomjs/issues/10269), for client argument --webdriver=ip:port, thus I cannot rely on phantomjs to pick the correct interface. I am currently under the impression that I will have to use IPTABLES. I want to route ever instance of my java

Selenium 2 Firefox Profile Change Location

[亡魂溺海] 提交于 2020-01-13 04:42:16
问题 For many weeks now, I have been looking around and I have not seen anything regards to changing the location the Firefox Profile saves to. I am using a specific Firefox profile, however, when the tests run the session is created in /tmp/. I would like the session to start up in a different location and save the files it uses in a location like: /var/tmp/. Is there any way to do this? Note: This is not a question as to where I get the RemoteWebDriver to use a specific Firefox profile. Edit: I

WebDriver Java: Reattach existing webdriver browser session to a driver instance

旧巷老猫 提交于 2020-01-12 10:46:58
问题 I'm looking for a way to reattach an existing webdriver browser session to a driver instance so i could control the browser again. So far, I've tried the following: I. ========================================== Reference: https://stackoverflow.com/a/38827934/2285470 Browser: Firefox v. 51.01 / Chrome v. 56.0.2924.87 Driver: geckodriver v. 0.14 / chromedriver v. 2.27 Solution tried: 1. Create a custom class that extends RemoteWebDriver public class RemoteDriver extends RemoteWebDriver { public

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

时光总嘲笑我的痴心妄想 提交于 2020-01-11 09:08:23
问题 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

Error forwarding the new session: Selenium Grid 2

最后都变了- 提交于 2020-01-11 03:57:04
问题 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,

java.lang.NullPointerException Selenium 2 classes

笑着哭i 提交于 2020-01-04 08:05:25
问题 My program works fine when run from my local machine with out using selenium grid with Remote Web driver. However when i set up the same test cases using selenium grid with Remote Web driver . Get message in eclipse saying: java.lang.NullPointerExceptionat PP_OBJ_Login.Adminlogin(PP_OBJ_Login.java:38) at PP_Main.step01_Login(PP_Main.java:86) Now I know the above means that line 38 and line 86 is where the problem is in both classes my problem is i don't know why this is happening when I use

Not able to add Cookies for IE8 browser (Java, Selenium Grid, WebDriver 2.41.0)

北城余情 提交于 2019-12-25 12:48:43
问题 I create remote webdriver as: URL hubUrl = new URL("http://172.30.234.216:4444/wd/hub"); DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer(); capabilities.setCapability(CapabilityType.ForSeleniumServer.ENSURING_CLEAN_SESSION, true); webDriver = new RemoteWebDriver(hubUrl, capabilities); In each test scenario I have a step which sets some value into Browser cookies. //.... webDriver.navigate().to("192.168.0.3:8060"); webDriver.manage().addCookie(new Cookie("parameter_name

Remote Watir-Webdriver IE form field not recognizing text and keys

橙三吉。 提交于 2019-12-24 03:25:38
问题 I have been using Cucumber / Watir-Webdriver just fine with IE. In my tests, I go to a form field and enter data and click a save button. All actions work great. Recently I decided to go with Selenium Grid 2 to distribute tests across machines for performance reasons. It worked great with FF and Chrome but I began to see a problem with IE. Here's the problem: when I use Selenium Grid 2 to drive IE remotely, when it sends keystrokes (i.e. send_keys or .set "some string of text") the text is

Python - Remote Webdriver with Extension installed in it

烂漫一生 提交于 2019-12-23 20:10:27
问题 I want to test one extension on different browser versions using BrowserStack. This is a function that returns driver with specified capabilities. I have a .crx file for Chrome and an .xpi file for Firefox on my local machine. I want to use Remote Webdriver with a corresponding extension installed, using Python. def my_webdriver(browser, browser_version, os, os_version): caps = {} caps["browser"] = browser caps["browser_version"] = browser_version caps["os"] = os caps["os_version"] = os

PhantomJS Proxy when using Remote Webdriver?

若如初见. 提交于 2019-12-23 03:35:29
问题 I am trying to use selenium in python with PhantomJS. I am running a selenium hub server so am using webdriver.Remote to start a webdriver. The normal way to pass a proxy to PhantomJS is: service_args = [ '--proxy=127.0.0.1:9999', '--proxy-type=socks5', ] browser = webdriver.PhantomJS('../path_to/phantomjs',service_args=service_args) This won't workthough for webdriver.Remote(service_args=service_args) As webdriver.Remote takes only desired_capabilities, not service args, as a parameter. Is