CyberKeeda In Social Media
Showing posts with label Selenium Cheat Sheet. Show all posts
Showing posts with label Selenium Cheat Sheet. Show all posts

Selenium XPATH Cheat Sheet

 



XPATH that contains Partial Text.


Example to Consider.

<span class="style-scope ytd-grid-video-renderer">1 day ago</span>

<span class="style-scope ytd-grid-video-renderer">84K views</span>

<span class="style-scope ytd-grid-video-renderer">1 hour ago</span>

<span class="style-scope ytd-grid-video-renderer">8 hour ago</span>


Need to Grep elements with Text that contains partial word as hour

Code Snippet.

 //*[contains(text(), "hour")]

In case if to Grep elements that contains partial tag.

 //*[contains(@id, "title")]





Read more ...
Designed By Jackuna