list links in a DIV using watir module

S

sean_n

Using the watir module, is there a way to show all the hyperlinks in a
DIV?
Can you please provide some code snippets?
 
7

7stud --

sean_n said:
Using the watir module, is there a way to show all the hyperlinks in a
DIV?
Can you please provide some code snippets?


How about:

div_links = ie.div:)id, "some_id").links
div_links.each { |l| puts l.to_s }
 
I

Inder Hooda

7stud said:
How about:

div_links = ie.div:)id, "some_id").links
div_links.each { |l| puts l.to_s }


This is really perfect to identify Divs.Works for me..

But how to click on each div (identified by DIV id )one at a time ?

My requirement is to click on each link & identify the output , compare
results & then move on to next div .... n so on ..

Please help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top