It works great!
@browser.h3(:text => "Brook").parent.parent.parent.button(:value => "View
Details").click
I didn't know about this. Can you tell me where is the best place to start
reading about .parent
.child
Thank you,
Cristina
On Thu, Mar 13, 2014 at 6:44 PM, Dan wrote:
> I would recomme
I would recommend something like this actually. If you have something that
you know, like the name of the dog, you can work back up and down the tree.
Using index can be your only option sometimes, but it can be brittle.
For example:
b.h3(:text => "Hanna").parent.parent.button(:value => "View
Hi and thank you!
I found the way:
@browser.button(:value => 'View Details', :index => 0).click
works great.
On Thu, Mar 13, 2014 at 1:58 PM, c w wrote:
> Thank you!
>
> The question is when we go here http://puppies.herokuapp.com
>
> how can we click in an easy way on the View Detail butto
Thank you!
The question is when we go here http://puppies.herokuapp.com
how can we click in an easy way on the View Detail button for Hanna? or any
View Detail button as we do not have an id.
Kind Regards,
Cristina
On Thu, Mar 13, 2014 at 6:03 AM, Oscar Rieken wrote:
> when you are using wat
when you are using watir you almost never have to use xpath. you didnt post
any html so its kind of hard to give you a simpler way to locate without
using xpath. but I would probably try to break out just the container and
then locate the button inside of it.
On Wed, Mar 12, 2014 at 5:20 PM, c w
Hi,
I am using the following and works.
However my question is if there simple way to define these xpaths?
When /^I click the first View Details button$/ do
@browser.button(:xpath,
"/html/body/div[@id='container']/div[@id='wrapper']/div[@id='content']/div[@class='puppy_list'][1]/div[@class='l