Help on Watir scripts

Hi,

I’m new in using Watir…
Can Watir access elements that is inside a partial view?
I have a page to test and that when I click View Source, the element isn’t there…
But when I tried to access the developer tool (press f12, same as firebug), the element exists in the source code.

Many Thanks,
Jog

I’m not sure by what you mean by ‘partial view’ but if it’s like JavaScript, you can access it, but you have to talk to Watir in the right way. You usually have to drill down in a specific way to give Watir enough information so that it can work correctly.

For example: In our webpage, I have to tell Watir to look within the frame where the objects in question reside for it to find them. So it looks like:

browser.frame(:id => “frameInHTML”).button(:id => “C0_36”).click

Something like that. I would look there. If you had a more specific example, I could do more. Good luck!

I talk about it more on my blog if you want to look there.