selenium-grid

Selenium driver instance persists if test is aborted on Jenkins

大兔子大兔子 提交于 2019-12-02 09:19:23
问题 Ok, so I am wondering how I can get my driver/browser sessions to properly exit if a test is aborted via jenkins. Locally, if I run my tests and abort them, the browser will quit properly. Via jenkins however, this does not happen. If I abort the job during the test phase where my tests are running on the selenium grid, the browser stays open - causing the node to still show up as being used because it did not pick up that the aborted job should have killed its browser session. I have been

Find which node my selenium-grid remote driver is running on?

半城伤御伤魂 提交于 2019-12-02 07:08:11
I obtain a RemoteWebDriver from the hub as follows: RemoteWebDriver driver = new RemoteWebDriver( new URL("http://whatever:4444/wd/hub"), DesiredCapabilities.internetExplorer() ); Is there a way to programatically find out which node in the grid the remote driver is running on? I want to log this in an effort to track down intermittent test failures. Please refer to this blog post of mine to learn how to find out the node ip and port to which the test was routed to. Blog post : https://rationaleemotions.wordpress.com/2016/01/15/where-did-my-test-run/ In a nutshell, here's what you need to do

Selenium driver instance persists if test is aborted on Jenkins

寵の児 提交于 2019-12-02 05:59:44
Ok, so I am wondering how I can get my driver/browser sessions to properly exit if a test is aborted via jenkins. Locally, if I run my tests and abort them, the browser will quit properly. Via jenkins however, this does not happen. If I abort the job during the test phase where my tests are running on the selenium grid, the browser stays open - causing the node to still show up as being used because it did not pick up that the aborted job should have killed its browser session. I have been messing around with cucumber hooks, but the more I think about it I am not sure if I can handle this with

Find which node my selenium-grid remote driver is running on?

南楼画角 提交于 2019-12-02 05:01:33
问题 I obtain a RemoteWebDriver from the hub as follows: RemoteWebDriver driver = new RemoteWebDriver( new URL("http://whatever:4444/wd/hub"), DesiredCapabilities.internetExplorer() ); Is there a way to programatically find out which node in the grid the remote driver is running on? I want to log this in an effort to track down intermittent test failures. 回答1: Please refer to this blog post of mine to learn how to find out the node ip and port to which the test was routed to. Blog post : https:/

Unable to create new Chrome remote session

▼魔方 西西 提交于 2019-12-02 01:46:41
I'm trying to launch a new Chrome browser using Selenium Grid but ending up with the below error Unable to create new remote session. desired capabilities = Capabilities [{browserName=chrome, version=55.0.2, platform=WINDOWS}], required capabilities = Capabilities [{}] Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700' System info: host: 'PL9710388', ip: '10.61.249.5', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_111' Driver info: driver.version: RemoteWebDriver Below is my code to launch the Remote browser java -Dwebdriver

Can Selenium Grid be configured to require authentication?

风流意气都作罢 提交于 2019-12-01 20:36:50
How can I force the Selenium hub/node require a password to be accessed? I don't mean authenticate the browser. I mean require the Selenium server to ask for a password before it will execute a test. It seems that if you are running a Selenium hub or node you are at great risk unless you are in a very private network. Right now the answer is no. It is however an open source project so you could write the functionality to do this and offer up a patch. the source is available here: http://code.google.com/p/selenium/source/checkout Or if you prefer github, the github mirror is: https://github.com

how to run my selenium test methods in parallel using testng

佐手、 提交于 2019-12-01 12:52:48
I am trying to run my automated tests(Selenium webdriver) in parallel using testng. this is the node which I am running: java -Dwebdriver.gecko.driver=chromedriver.exe -jar selenium-server-standalone-3.4.0.jar -role node -hub http://localhost:4444/grid/register -browser browserName=chrome,maxInstances=2 -maxSession 2 this is my test class: public class TestParallel { Login login; //@BeforeMethod(alwaysRun = true) public SeleniumDriverCore testSetup() throws FileNotFoundException, IOException{ SeleniumDriverCore driver = new SeleniumDriverCore("config/chromeDriverConfig"); Properties config =

Distinguish different Selenium Grid node

心不动则不痛 提交于 2019-12-01 12:24:18
I'm dealing right now with following problem: My Selenium Grid instance should connect few nodes which are in different locations and I would like to run each test in every location. How can I point to Selenium Grid that it should choose one node from each location and send test there? I tried manipulating browser name or platforms (ex. naming it firefox-pl/firefox-fr or windows-pl/windows-fr) but I received always following exception: Selenium::WebDriver::Error::UnknownError: Error forwarding the new session cannot find and I found out that those values are not changeable. Is there any other

Distinguish different Selenium Grid node

好久不见. 提交于 2019-12-01 11:36:43
问题 I'm dealing right now with following problem: My Selenium Grid instance should connect few nodes which are in different locations and I would like to run each test in every location. How can I point to Selenium Grid that it should choose one node from each location and send test there? I tried manipulating browser name or platforms (ex. naming it firefox-pl/firefox-fr or windows-pl/windows-fr) but I received always following exception: Selenium::WebDriver::Error::UnknownError: Error

Security in Selenium 2?

为君一笑 提交于 2019-12-01 11:26:42
I was asking myself if Selenium has any possibilities to secure the communication in Selenium Grid for example. As far as I know Selenium communicates via JSON and Selenese commands. But it is not encrypted. Are there any possibilities to encrypt the communication? Thanks a lot. Quick hack: make an ssh tunnel. Forward remote server's port 4444 as a local port using following ssh command: ssh user@remotesrv -L 4444:127.0.0.1:4444 Now when you connect to your local port 4444, it actually connects to your server's port 4444 on a secure link. Refer to this link for tutorial. Afterwards, just open