Monday, June 18, 2018

How to convert Xpath to CSS In Selenium

This post explains how to covert Xpath to CSS Selector without any coding effort. Lets check out the below link that convert Xpath selector to CSS Selector :

How to convert Xpath to CSS in selenium



Demo : 



Lets us know if you have any queries in comment section below.





3 comments:

  1. Very nice article.
    Thanks for sharing with us, keep posting.
    for more information visit: https://bit.ly/2t6Vrcv

    ReplyDelete
  2. Hi,
    Can you please help me to convert below xpath to css
    "css=span[class = 'ui-dialog-title' and text() = '%s']>ancestor::div[role = 'dialog']";

    ReplyDelete
  3. I am trying to create the css from below but not succeeding, Please help me to create the css for below html
    div class="ui-dialog ui-widget ui-widget-content ui-corner-all ui-draggable" style="outline: currentcolor none 0px; z-index: 3002; top: 265px; left: 415px; display: block; height: auto; width: 450px;" tabindex="-1" role="dialog" aria-labelledby="ui-id-1" aria-disabled="false"

    ReplyDelete