John Lolis wrote:
> headline = $ie.div(:text, 'Pragmatic Version Control')
> link = $ie.link(:class => 'addtocart', :after? => headline) 
>
> Is this saying you want the link that comes after headline? Is there a 
> before? :)
>   
Yes, there would also be a 'before' option, plus some others
> *if* thats the case, my only problem with it is that it seems to not follow 
> the standard syntax of Watir (as i understand it).
>
> how about ie.link(:class,'addtocard').after(ie.div(:text,'Pragmatic Version 
> Control'))
>   
This couldn't quite work. Well, it would "work" but what it would do is 
return true or false based on whether the link was after the div. 
However the following could be implemented, and in fact was a proposal 
that i had considered earlier:

  link = ie.div(:text, 'Pragmatic Version Control').after.link(:class, 
'addtocard')


I think this is less intuitive and it would be somewhat harder to 
implement. That's why i came up with the other proposal, above.

Bret
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to