There are two types of HTML tables published on the web- Static tables : Data is static i.e. Number of rows and columns are fixed. Dynamic tables : Data is dynamic i.e. Number of rows and columns are NOT fixed.Handling static table is easy, but dynamic table is a little bit difficult as rows and columns are not constant. Using X-Path to Locate Web Table Elements Before we locate web element, first let's understands- What is a web element? Web elements are nothing but HTML elements like textbox, dropdowns radio buttons, submit buttons, etc. These HTML elements are written with start tag and ends with an end tag. For Example, <p> My First HTML Document </p>. Steps for getting X-path of web element that we want to locate. Step 1) In Chrome, Go to http://money.rediff.com/gainers/bsc/daily/groupa Step 2) Right click on web element whose x-path is to be fetched. In our case, right click on "Company" Se...
Verify Specific Position of an Element Selenium IDE indicates the position of an element by measuring (in pixels) how far it is from the left or top edge of the browser window. · verifyElementPositionLeft - verifies if the specified number of pixels match the distance of the element from the left edge of the page. This will return FALSE if the value specified does not match the distance from the left edge. · verifyElementPositionTop - verifies if the specified number of pixels match the distance of the element from the top edge of the page. This will return FALSE if the value specified does not match the distance from the top edge.
How to run a group of test cases using TestNG? TestNG allows you to perform sophisticated groupings of test methods. Not only can you declare that methods belong to groups, but you can also specify groups that contain other groups. Then TestNG can be invoked and asked to include a certain set of groups (or regular expressions) while excluding another set. This gives you maximum flexibility in how you partition your tests and doesn’t require you to recompile anything if you want to run two different sets of tests back to back. Groups are specified in your testng.xml file and can be found either under the <test> or <suite> tag. Groups specified in the <suite> tag apply to all the <test> tags underneath. @Test (groups = { "smokeTest", "functionalTest" }) public void loginTest(){ System.out.println("Logged in successfully"); } How to create Group of Groups in TestNG? Groups can also inc...
Comments
Post a Comment