SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Aug 2011
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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

  2. #2
    SitePoint Member bec04015's Avatar
    Join Date
    Aug 2011
    Location
    Idaho
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile

    Quote Originally Posted by jogwang2 View Post
    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.frameid => "frameInHTML").buttonid => "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.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •