Posts

Showing posts with the label Selenium Grid

Selenium Grid with Docker

What is Selenium Grid? Selenium Grid is a part of Selenium component which supports Distributed test execution and it will let us run our tests on Multiple Operating systems against different browsers simultaneously. Traditional Selenium grid steps are, 1.Start Hub and connect all the nodes to it using below commands      Hub : java -jar selenium-server-standalone-3.xx.x.jar -role hub      Node1 : java -jar selenium-server-standalone-3.xx.x.jar -role node -hub              http://<systemip>:4444/grid/register -port 5556 -browser browserName=firefox      Node2 : java -jar selenium-server-standalone-3.xx.x.jar -role node -hub              http://<systemip>:4444/grid/register -port 5557 -browser browserName=chrome 2.Define the Desired capability to identify the OS platform and OS browser for execution     DesiredCapabilities desCap = null;     if(browser.equals("firefox")){         desCap=DesiredCapabilities.firefox();         desCap.setBrowserNa

Selenium script execution into Continuous Integration Process

                 Most of the people end up saying of integrating the Selenium Test suite with any one of the Continuous Integration server (Jenkins, Bamboo,..etc) to trigger the execution after build deployment. The suite may be Sanity, Smoke or Regression Test suite. But here challenging part is the CI tools mostly run on Linux box and we may not have expected browser installed in it. I have listed some solutions for CI, 1) Change the Selenium test suite browser configuration and execute it using HtmlUnitdriver or PhantomJSDriver ( Headless execution)        The importance of having “headless” tests is:     a) The majority of Linux server and Windows Core Servers deployments doesn’t have GUI at all     b) To avoid opening the browser in the foreground during the build agent is being used for desktop applications testing which require focus  Execute the Automation Test suite using HtmlUnitdriver by making a simple change in the test    script browser configuration and com

Selenium Webdriver Interview Questions with Answer

1. Selenium doesn't support __________ to write programs (Test Scripts) a) Java b) Perl c) VBScript d) Python 2. __________ is an Advantage of Selenium WebDriver? a) Supports Web based Applications only b) No built-in Result Reporting facility c) Open Source d) No IDE 3. In webdriver, which methods navigates to a URL? a) goToUrl("url") b) navigate.to("url") c) getUrl("url") d) get("url") 4. Which of the following is the correct ‘Webdriver’ command to “delete all cookies in the browser”? a) Driver.deleteAllCookies() b) Driver.manage().deleteCookies() c) Driver.manage().deleteAllCookies() d) Driver.deleteCookies() 5. In webdriver, which of the following is a valid select statement that selects a value from a dropdown element? a) All of the listed options b) selectByIndex() c) selectByValue() d) selectByVisibleText() 6. In webdriver, selectAllOptions() is a valid command. a) True b) False 7. In webdriver, whic