Need value from HTML source

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Need value from HTML source

poornima hebbar
Hi Tarun,

With the below provided html thing i want to get only the price value how do i do that from selenium 1.0
 £121.50
Reply | Threaded
Open this post in threaded view
|

Re: Need value from HTML source

softwaretestingforum
Administrator
Hello Poornima,

Welcome to group.

Did you try getText API - http://selenium.googlecode.com/svn/trunk/docs/api/java/com/thoughtworks/selenium/DefaultSelenium.html#getText(java.lang.String)

You could use class name 'cost' for locating the object.
~ seleniumtests.com
Reply | Threaded
Open this post in threaded view
|

Re: Need value from HTML source

 
poornima hebbar
THanks Tarun. but i forgot to mention that cost tag is appearing more than once in HTML page

 £12.50
Reply | Threaded
Open this post in threaded view
|

Re: Need value from HTML source

softwaretestingforum
Administrator
Could you post small version of your html?
It's only that you need to reach this element and get the text.
~ seleniumtests.com