remotewebdriver

Selenium Grid running tests in parallel

北城以北 提交于 2019-12-21 23:44:35
问题 Currently, I have a Selenium grid setup, with 1 local hub and 2 local nodes. The hub is capable of distributing the tests to run in parallel and distribute it over to the nodes. I am running the tests in parallel. The following is the base test public abstract class BaseTest { String testFolder; String testName; protected String envName; protected Configuration config; protected String host; protected RemoteWebDriver driver; protected String proxy; protected SomeData someData; protected

Using Selenium RemoteWebDriver behind corporate proxy

核能气质少年 提交于 2019-12-21 02:35:42
问题 How can I connect to a selenium grid such as BrowserStack via RemoteWebDriver from behind a corporate proxy? The application under test is outside the proxy and freely accessible from BrowserStack. This Using Selenium RemoteWebDriver behind corporate proxy (Java) stackoverflow question asked the same question but I couldn't follow the accepted answer. 回答1: I managed to get something working based on the accepted answer in the linked stackoverflow question, here's my implementation in case

How to instantiate InternetExplorerDriver with Selenium WebDriver using C#

醉酒当歌 提交于 2019-12-19 15:35:00
问题 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

How to instantiate InternetExplorerDriver with Selenium WebDriver using C#

谁说我不能喝 提交于 2019-12-19 15:34:10
问题 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

How to set browser language in selenium remote webdriver capabilities

风流意气都作罢 提交于 2019-12-13 17:30:31
问题 I need to start Firefox / Chrome using remote webdriver with a specific browser language. I know how to do it while running locally. But is it possible to start a remote webdriver with specifying browser language. 回答1: This is how object creation done is RemoteWebDriver, WebDriver driver = new RemoteWebDriver(new URL("http://localhost:PORT_NUMBER/"), DesiredCapabilities.firefox()); Profiller is the key here, var fp = new FirefoxProfile(); fp.SetPreference("intl.accept_languages", "en-au");

Unable to launch Chrome in remote webdriver

浪子不回头ぞ 提交于 2019-12-13 08:04:10
问题 I have set up 2 PCs as selenium hub & node.Now, I am trying to browse a URL in that node, from a console app that runs in the hub. But there is an error when initialising the browser.Both PCs run on windows 7. //setting up the hub Process.Start("cmd.exe", "/C java -jar selenium-server-standalone-2.47.1.jar -role hub"); //setting up the node string Command1 = "/C cmdkey.exe /add:\\DES100 /user:abcd /pass:abcd123"; string Command2 = "psexec.exe \\DES100 -w D:\\Selenium java -Dwebdriver.chrome

how to use WebDriverBacked Selenium

淺唱寂寞╮ 提交于 2019-12-13 00:23:40
问题 I have been trying to find a way to test an application that will only open on IE and the application has pages rendered in Silverlight looked at the silvernium but could not get it to work as when I run it there is a missing dll.so I found out about the WebdriverBackedSelenium which I have tried to use but I get the error OpenQA.Selenium.WebDriverException' occurred in WebDriver.dll Cannot find a file named 'C:\Users\.nuget\packages\selenium.webdriver\3.14.0\lib\netstandard2.0\isTextPresent

Selecting multiple elements with Selenium

99封情书 提交于 2019-12-12 16:54:39
问题 I'm creating List of all available elements with below Xpath. IList<IWebElement> test= Driver.FindElements(By.XPath("//*[@id='middle-container']//div[@class='middle-section match-list']//div[contains(@class,'title')]//span[contains(text(),'" + Event.Trim() + "')]//..//..//..//..//div[contains(@class,'drop-down-content')]//table[contains(@class,'hidden-xs')]//tr//td[contains(@class,'bettype')]//a[@class='bet']`//span")); So all the elements available in that Xpath need to be clicked. Running

Change language on Firefox with Selenium Python

谁说我不能喝 提交于 2019-12-12 14:02:01
问题 I am trying to change the language of Selenium Webdriver Firefox from English to Spanish. I have the following code in place: def get_webdriver(attempts=3, timeout=60): firefox_profile = webdriver.FirefoxProfile() firefox_profile.set_preference("intl.accept_languages", "es-es") desired_capabilities = getattr( DesiredCapabilities, "FIREFOX").copy() hub_url = urljoin('http://hub:4444', '/wd/hub') driver = webdriver.Remote( command_executor=hub_url, desired_capabilities=desired_capabilities,

Selenium remotewebdriver stuck before launching browser

梦想与她 提交于 2019-12-12 04:35:06
问题 I'm trying to launch Firefox remotely on a windows machine from UNIX box using remotewebdriver I am also starting the selenium node remotely using ssh(It starts fine) using Cygwin and OpenSSH. (I've installed firefox in the path c:\cygwin64\home\Administrator\firefox) I am launching the grid node using: java -jar selenium-server-standalone-2.53.0.jar -role node -hub http://HUB_IP:4444/grid/register -port 5566 -Dwebdriver.gecko.driver=geckodriver.exe -Dwebdriver.firefox.bin="firefox/firefox