selenium-grid

Properties for Selenium Grid Hub/Node Config

 ̄綄美尐妖づ 提交于 2019-11-27 02:56:53
问题 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

What is the best way to avoid NoSuchElementException in Selenium?

青春壹個敷衍的年華 提交于 2019-11-27 01:43:48
I have written few test cases in Selenium WebDriver using Java and execute them on grid (hub and multiple nodes). I have noticed that a few test cases fail due to NoSuchElementException . What is the best and robust way to avoid NoSuchElementException and ensure the element is always found? You can never be sure that element will be found, actually this is purpose of functional tests - to tell you if anything changed on your page. But one thing which definitely helps is to add waits for the elements which are often causing NoSuchElementException like WebDriverWait wait = new WebDriverWait

Chrome & Firefox on Windows vs Linux (selenium)

ぃ、小莉子 提交于 2019-11-26 21:54:06
问题 I'm running Selenium grid with only Windows machines and the resource use is quite high. I've been toying with the idea of putting Chrome and Firefox inside docker containers to improve efficiency. My question is are there any key differences in the browsers themselves on the different platforms, i.e. would Chrome on Windows behave differently to Chrome on Linux or do they run the same code and behave the same? 回答1: Selenium tends to mock the following User Actions : Sending Text : sendKeys(

Protractor - run multiple tests in parallel on different browsers

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-26 20:07:02
问题 I can't find any information on how to set this up, but it seems like a pretty basic concept, so I'm sure there's an answer out there. I know how to run protractor on different browsers by setting the browserName property of the capabilities object in the config. And that's working great. I can set it to 'chrome' or 'firefox' or whatever I need and it runs just as expected. But the only way to run a single test suite against multiple browsers (as far as I know) is to create separate config

Cannot find firefox binary in PATH. Make sure firefox is installed

守給你的承諾、 提交于 2019-11-26 15:24:50
In Selenium Grid I am trying to execute a simple program and I'm getting Cannot find firefox binary in PATH though I have added the binary path in my code. My code and the error are given below. Kindly need help. Thanks in advance. Code package Sample; import java.net.MalformedURLException; import java.net.URL; import org.openqa.selenium.Platform; import org.openqa.selenium.WebDriver; import org.openqa.selenium.remote.DesiredCapabilities; import org.openqa.selenium.remote.RemoteWebDriver; import org.testng.annotations.Test; import org.testng.annotations.BeforeTest; import org.testng

Selenium Grid: MaxSessions vs MaxInstances

最后都变了- 提交于 2019-11-26 15:23:29
问题 I was wondering if anybody could shed some light on a Selenium question that has been giving us a bit of head scratching. We're confused on meaning of MaxSession and MaxInstances of Selenium Grid. We think that the MaxSession is the total number of test sessions that can run on a single node. And we also think that the MaxInstances is the total number of browsers that a test can open. Or is MaxInstances the total number of browsers available to the node? The command that we are using is: java

What is the best way to avoid NoSuchElementException in Selenium?

我只是一个虾纸丫 提交于 2019-11-26 09:45:00
问题 I have written few test cases in Selenium WebDriver using Java and execute them on grid (hub and multiple nodes). I have noticed that a few test cases fail due to NoSuchElementException . What is the best and robust way to avoid NoSuchElementException and ensure the element is always found? 回答1: You can never be sure that element will be found, actually this is purpose of functional tests - to tell you if anything changed on your page. But one thing which definitely helps is to add waits for

Cannot find firefox binary in PATH. Make sure firefox is installed

99封情书 提交于 2019-11-26 05:58:49
问题 In Selenium Grid I am trying to execute a simple program and I\'m getting Cannot find firefox binary in PATH though I have added the binary path in my code. My code and the error are given below. Kindly need help. Thanks in advance. Code package Sample; import java.net.MalformedURLException; import java.net.URL; import org.openqa.selenium.Platform; import org.openqa.selenium.WebDriver; import org.openqa.selenium.remote.DesiredCapabilities; import org.openqa.selenium.remote.RemoteWebDriver;

Can Selenium Webdriver open browser windows silently in background?

南楼画角 提交于 2019-11-26 03:01:58
问题 I have a selenium test suite that runs many tests and on each new test it opens a browser window on top of any other windows I have open. Very jarring while working in a local environment. Any way to tell selenium or the OS (MAC) to open the windows in the background? 回答1: There are a few ways, but it isn't a simple "set a configuration value". Unless you invest in a headless browser, which doesn't suit everyone's requirements, it is a little bit of a hack: How to hide Firefox window