How to register multiple browser types to Selenium Grid

If we want to register multiple types of browsers to Selenium Grid we must follow the following logic: The base command for when we want to add a node to the hub is the following: java -jar selenium-server-standalone-2.35.0.jar -role node -hub http://localhost:5555/grid/register -browser browserName=firefox,maxInstances=5 Similar Posts from the author: How to connect multiple machines to […]

Read more
Parameterized JUnit tests with Selenium WebDriver

With JUnit 4 we’re able to Parameterize the tests. Parameterized tests allow developers to run the same tests over and over again using different values. Now we introduce the way to use the parameterized JUnit tests with Selenium WebDriver. Here is the sample code, which opens the Google search page, searches three different phrases and […]

Read more
Using Canoo Web Test

From the Canoo web page, download the latest WebTest release. Current one is 3.0. http://webtest.canoo.com/webtest/manual/Downloads.html Unzip the bulid.zip file, for example to Webtest folder. Now configure the system path You will find it in the following location:  Open the System Properties (WinKey + Pause), select the Advanced tab, and click to the Environment Variables button, […]

Read more
How to run parallel tests with Selenium WebDriver and TestNG in Chrome browser and in Internet Explorer browser

In the previous lesson(How to run parallel tests with Selenium WebDriver and TestNG) we used Firefox browser to run the tests. Now we introduce how to run the tests parallel in Chrome and in Internet Explorer browsers. Firstly download the latest chromedriver and IEDriverServer files. You can download the IEDriverServer file from the http://code.google.com/p/selenium/downloads/list site. […]

Read more
How to run parallel tests with Selenium WebDriver and TestNG

First install Java JRE and JDK. In Advanced system settings/ Environment Variables setup java path: Create a new system variable (if it is not created): Name: JAVA_HOME Value(the location of the jdk):   C:\Program Files\Java\jdk1.7.0_25 In to the Path variable add: The location of jre:  c:\Program Files (x86)\Java\jre7\bin\; Install selenium and testing to Eclipse. Download (from  […]

Read more
How to use TestNG with Selenium WebDriver

(The precondition for this tutorial that the Selenium WebDriver is already installed.) Firstly go to TestNG website’s download page, and follow the instructions to install the TestNG plugin to Eclipse. (http://testng.org/doc/download.html) After the TestNG was installed, create a new java class file (without main method). Create the setUp() function. To this function you can put […]

Read more
How to select an element from table if there is no ID

When we want to select a value from a table but the element doesn’t have id or other identification, we can use the other cells of the table to identify the value. For example: There is a table with stock market data and we want to get the value of the percentage of change (the […]

Read more
How to get data from input field or from textarea?

In certain situations we need to get data from input field or from textarea. The selenium getText() function is not good to get the data from input filed (<input>) or from textarea (<textarea>). driver.findElement(By.xpath(TEXTAREA.XPATH)).getText() – returns an empty string. The solution is to use getAttribute(“value”). driver.findElement(By.xpath(TEXTAREA.XPATH)).getAttribute(“value”); Similar Posts from the author: How to select an element […]

Read more