Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It is difficult to give you specific advice (exact code) without seeing the HTML, or at least the path to the object in question.</p> <p>With the exception of frames (each of which acts like it's own unique web page) you only need to provide as much of the 'path' to an object as is needed to ensure uniqueness. For example if you had a Link where you did not know the URL in advance, and it has no unique text or identifier, BUT it was inside another 'container element like a div that had some unique name, class, id etc (or a combination of those) then you could identify the object from the container down. e.g.</p> <pre><code>browser.div(:how, what).link(:index, 0).click #note index would be 1 in watir 1.x, 0 in 2.x and watir-webdriver </code></pre> <p>In the case of frames, and especially (may the gods have pity upon you) <em>Nested Frames</em>, you need to specify ALL of the frames that are part of the path to the object, and then enough details to ensure it can be uniquely identified within the frame that contains the element you are trying to access. </p> <p><em>(editorial)</em>: For the most part, from what I've seen, most modern websites eschew the use of frames except in a very few specific instances such as 'framing' a link to an external site (e.g. Linked-In's handling of links to other sites posted within it's group discussion threads) Use of a lot of frames is pretty much considered 'web 1.0' if not even 'pre 9/11' by a lot of folks who use CSS and other methods to achieve the same visual effects as using frames for sub-areas etc, without all the downsides of frames.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload