- terrynweze
- Posts : 5
Join date : 2012-03-01
retrieving element by xpath/css help
Thu Mar 08, 2012 3:36 am
hello i have a number of elements that appear the same except for the text value e.g:
......
< p class="classname">Order Received< /p>
.......
< p class="classname">Order Dispatched< /p>
etc. etc.
i have tried to use the following xpath to identify the elements but it does not seem to work:
//p[@text()="Order Received"] and //p[@text()="Order Dispatched"]
any help appreciated.
......
< p class="classname">Order Received< /p>
.......
< p class="classname">Order Dispatched< /p>
etc. etc.
i have tried to use the following xpath to identify the elements but it does not seem to work:
//p[@text()="Order Received"] and //p[@text()="Order Dispatched"]
any help appreciated.
- faramkaProfessional
- Posts : 143
Join date : 2011-09-15
Location : Poland
Re: retrieving element by xpath/css help
Thu Mar 08, 2012 3:02 pm
Simply use text() without '@'
- Code:
//p[text()="Order Received"]
//p[text()="Order Dispatched"]
Permissions in this forum:
You cannot reply to topics in this forum
|
|