Learn Selenium in 1 Day: Definitive Guide to Learn Selenium for Beginners by Krishna Rungta

Learn Selenium in 1 Day: Definitive Guide to Learn Selenium for Beginners by Krishna Rungta

Author:Krishna Rungta [Rungta, Krishna]
Language: eng
Format: azw3
Published: 2017-05-02T04:00:00+00:00


If we won't use any predicate, XPath will access the first sibling. Therefore, we can access the first <tr> using either of these XPath codes.

Step 4 - Add the Succeeding Child Elements Using the Appropriate Predicates

The next element we need to access is the second <td>. Applying the principles we have learned from steps 2 and 3, we will finalize our XPath code to be like the one shown below.

Now that we have the correct XPath locator, we can already access the cell that we wanted to and obtain its inner text using the code below. It assumes that you have saved the HTML code above as "newhtml.html" within your C Drive.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.