SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Jun 2011
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Converting XPath to CSS

    Hi All,

    Our company recently decided to move from manual testing to automated testing with Selenium. I have everything working exceptionally well in Firefox but IE8 it is extremely slow.

    After doing some research I realized its because I'm using XPath instead of CSS. My main issue is with our menu in our application. The menu has sub-menus, etc that Selenium can not identify. I've tried using Firebug,FirePath,FireFind, and plenty of research on the topic but nothing helps BUT I am able to get the XPath location for each menu item.

    For example, how do I convert an XPath such as "//html/body/div[2]/div/div/div/div/table/tbody/tr/td[2]" to CSS???

    Not sure if this helps but this is one of the links I'm attempting to click on.

    <td class="label" style="-moz-user-select: none;">Forecast</td>

    Please help. I believe this is all I need to complete my automated tests for IE8.

    Thanks All,
    Karl

  2. #2
    Junior Member
    Join Date
    Jun 2011
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Converting XPath to CSS

    I was able to figure this out using the css=.label:contains('Forecast')

    Took all day to figure out but it works!

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 12.00%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 12:14 AM.

Copyright BetaSoft Inc.