Quality Testing

Quality is delighting customers

How to find no.of links using Selenium Tool? Please share me piese of code.

Thanks,
Joanna

Views: 131

Reply to This

Replies to This Discussion

Hi Joanna,
I havent worked on selenium yet, but as per automation way you need to run a 'For' loop from i = 0 to UpperBound / your limit

something like this in qtp:->

Set oDesc Description.Create()

oDesc("micclass").Value "WebLink"
Set Lists browser("Browsername").Page("Restricted Party Screening").ChildObjects(oDesc)

NumberOfLists Lists.Count()
msgbox numberoflists

For i 0 To NumberOfLists - 1

msgbox Lists(i).getroproperty("name")

Next
The get_all_links() function in the Ruby Selenium Client is a good start... assuming your using the Ruby-Selenium Client of course :)

The source for the function looks like this:

def get_all_links()
return string_array_command("getAllLinks", [])
end


The online documentation is here: http://selenium-client.rubyforge.org/

Mark.

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2019   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service