Tuesday 12 August 2014

Steps to install TestNG and Create your own reliative xpath by adding class Name

Create your own relative xpath by adding class Name

By.xpath("//ul[@class='menu']/li[4]/ul/li[2]/a")));

Below is the sample html file

<ul class="menu">
<li>
<li>
<li>
<li>
<a class="active" href="javascript://">Service Assurance</a>
<ul class="sub-menu">
<li>
<li>
<a onclick="lampStack('lampStack/renderLampStackView.html')" href="javascript://">Web Services</a>
</li>
<li>

Steps to install TestNG:

1. Click Help -> Install New Software.
2. Paste this URL http://beust.com/eclipse in the "Work with" edit box and click on "Add" button.
3. In the ‘Name’ column we can see "TestNG" -> Select this and click "Next" button.
4. Click on "Next" and click on the radio button "I accept the terms of the license agreement".
5. Click on "Finish".
6. Click on "Next" button.
Once the above steps are done, this will install the TestNG plug-in for Eclipse and it will start for restart of Eclipse. Just restart the Eclipse. You should be good.

Powered By- selenium blogs Hitesh Singh 

No comments:

Post a Comment