selenium-grid

selenium grid listening on node port instead of hub port

孤人 提交于 2019-11-28 13:01:45
For my test, I am running grid and node locally on different ports. java -jar /usr/bin/selenium-server.jar -port 4444 -role hub java -jar /usr/bin/selenium-server.jar -role node -hub http://127.0.0.1:4444/grid/register -port 5556 So, the grid is running on 4444 and node is running on 5556. In my test, if i start the driver as driver = webdriver.Remote(command_executor='http://127.0.0.1:4444/wd/hub', desired_capabilities=desired_capabilities) then the test fails with the exception response = {'status': 500, 'value': '{"status":13,"value":{"class":"java.lang.NullPointerException","stackTrace":[{

WebDriver Chrome Browser: Avoid 'Do you want chrome to save your password' pop up

[亡魂溺海] 提交于 2019-11-28 11:57:10
Every time my webdriver tests login into the application, 'Do you want chrome to save your password' pop up appears.. Is there a way to avoid this?? Please help. Thanks, Mike You need to configure the following chrome driver options: chromeOptions: { prefs: { 'credentials_enable_service': false, 'profile': { 'password_manager_enabled': false } } } I'm using Python, and this worked for me: from selenium import webdriver from selenium.webdriver.chrome.options import Options chrome_options = Options() chrome_options.add_experimental_option('prefs', { 'credentials_enable_service': False, 'profile'

Is there a way too prevent selenium automatically terminating idle sessions?

徘徊边缘 提交于 2019-11-28 11:11:22
问题 I am using selenium for automating some interactions with websites. This process involves opening several browsers and having them perform actions intermittently. However, occasionally there are long (> 1 hour) periods of inaction, and selenium seems to automatically kill browser sessions after ~30 minutes of not being called. I would like to set this timeout to 7 hours or so, but I cannot find any way of doing this. This is the message selenium sends as it helpfully closes an idle browser.

RemoteWebDriver throws “org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session”

左心房为你撑大大i 提交于 2019-11-28 10:43:29
问题 I'am trying to run a simple code from hub to node, hub and node connections are successful. While executing the program I am getting the exception org.openqa.selenium.SessionNotCreatedException Chrome driver path which I have mentioned is a share path that can be accessible from the node machine. Chrome Version: 58.0.3029.110 Chrome Driver Version: 2.9 Both Hub and Node are remote machines. Below is the code used: public static void main(String[] args) throws MalformedURLException { WebDriver

Multiple tests on the same IEdriver instance - memory issues

≡放荡痞女 提交于 2019-11-28 10:27:46
问题 I'm running lots of selenium tests on my node which is windows machine. In order to speed up test execution by avoiding starting/closing IEDriver instance after every test I decided to reuse the same driver instance for every test. Everything works fine with firefox and chrome, but IE11 is having serious issues. After about 30 minutes IE freezes without any exception and execution stops, it completely loses connection with my node. I can see that IE11 process (iexplore.exe) uses massive

Selenium RemoteWebDriver c# - System.InvalidOperationException

柔情痞子 提交于 2019-11-28 10:04:19
I have a sample UI test project using v3.4.0 of Selenium.WebDriver. Everything works fine when I run the tests against a local driver but I want to get things working using Selenium Grid 2. As soon as I try to instantiate a new RemoteWebDriver I get an exception with little detail. Driver = new RemoteWebDriver(new Uri(GridUrl), Capabilities); Note: GridUrl is " http://localhost:4444/wd/hub " Throws a System.InvalidOperationException with StackTrace as follows: at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse) at OpenQA.Selenium.Remote.RemoteWebDriver

Properties for Selenium Grid Hub/Node Config

拟墨画扇 提交于 2019-11-28 09:21:48
I'm going through a process of upgrading my Selenium Hub/Nodes to version 3.3. Everything works fine, but I want to make sure I have optimal configuration... problem is I can't find a complete list of Hub/Node properties anywhere. I've looked through: https://seleniumhq.github.io/docs/grid.html http://www.seleniumhq.org/docs/07_selenium_grid.jsp https://github.com/SeleniumHQ/selenium/wiki/Grid2 https://github.com/SeleniumHQ/selenium/blob/master/java/server/src/org/openqa/grid/common/defaults/DefaultNodeWebDriver.json https://github.com/SeleniumHQ/selenium/blob/master/java/server/src/org/openqa

Parameterized Selenium Tests in Parallel with TestNG

喜你入骨 提交于 2019-11-28 08:45:47
First of all, sorry for my english, it's not so perfect :) So I'm facing with the following problem: I'm trying to run parallel tests in different browsers using Selenium Grid and TestNg and I pass the parameters in the @BeforeTest method. My problem is that when every test get initialized, it seems that they will use the last test's parameters. So in this example when I run the test, it will open two Chrome, instead of one Firefox and one Chrome. (The browser.getDriver() method returns a RemoteWebDriver) TestNG.xml: <suite thread-count="2" verbose="10" name="testSuite" parallel="tests"> <test

Error SessionNotCreatedException with NativeConstructorAccessorImpl.newInstance0 while running selenium remotedriver

故事扮演 提交于 2019-11-28 05:41:48
问题 I am running the following but getting the error public class base { public static WebDriver driver; public static void main(String[] args) throws MalformedURLException, InterruptedException { System.setProperty("webdriver.chrome.driver", "C:\\code\\lib\\browser drivers\\chromedriver.exe"); String URL = "http://www.google.com"; String Node = "http://localhost:4444/wd/hub"; DesiredCapabilities cap = DesiredCapabilities.chrome(); cap = DesiredCapabilities.chrome(); cap.setPlatform(org.openqa

SessionNotCreatedException: Unable to create new service: GeckoDriverService with Selenium Grid on Ubuntu failing to drive Firefox

做~自己de王妃 提交于 2019-11-28 01:29:17
I fail to drive Firefox from Selenium with geckodriver. This is odd, because chrome is driven with same framework without errors! These are my Version numbers: Firefox 54.0 (64-bit) Chrome Version 62.0.3202.94 (Official Build) (64-bit) selenium-server-standalone-3.7.1.jar client-combined-3.5.3-nodeps.jar geckodriver-v0.19.1-linux64 chromedriver_linux64 Ubuntu 16.10 The error I get from Selenium webdriver with java is the following: --------------------------------Error: leder@leder-VirtualBox:~/Source/SeleniumCheese/bin$ ./execute_grid.sh Exception in thread "main" org.openqa.selenium