[support] Side effects/behaviour of overlay-child.js (with Selenium IDE)

Jamie Holly hovercrafter at earthlink.net
Tue Jan 28 03:34:32 UTC 2014


With the dialog opened, right click in it and select "inspect element in 
firebug". You can then work your way up the tree to the iframe. People 
dialog is the title attribute of the iframe.

Jamie Holly
http://hollyit.net

On 1/27/2014 10:29 PM, Peter Kehl wrote:
> hi Jamie,
>
> Thank you, that works, indeed. But I don't understand where you've got 
> 'People dialog' from.
>
> It wasn't obvious to me that there are iframes (and it's still not 
> clear to me).  I wonder how to detect that as a user. I've used 
> Firebug > Net tab (whether with filter HTML+XHR, or showing any HTTP 
> requests) and I cleared Firefox cache.  I navigate from dashboard to 
> 'People' tab. All HTML contents that I get is for:
>
> http://localhost/drupal7/
> http://localhost/drupal7/?q=admin%2Fpeople&render=overlay
>
> When I search for 'People dialog', it's not in either of them. So how 
> do I go about identifying what comes through iframes, please? That's 
> why I've asked about tab behaviour in my initial question.
>
> -Peter Kehl
>
> On 28 January 2014 11:17, Jamie Holly  wrote:
>
>     Peter,
>
>     Did you read the link I sent? I ask because I've never used
>     Seleneum before, but this part really caught my eye:
>
>         In AJAX driven web applications, data is retrieved from server
>         without refreshing the page. Using andWait commands will not
>         work as the page is not actually refreshed. Pausing the test
>         execution for a certain period of time is also not a good
>         approach as web element might appear later or earlier than the
>         stipulated period depending on the system's responsiveness,
>         load or other uncontrolled factors of the moment, leading to
>         test failures. *The best approach would be to wait for the
>         needed element in a dynamic period and then continue the
>         execution as soon as the element is found.**
>         **
>         **This is done using waitFor commands, as
>         waitForElementPresent or waitForVisible, which wait
>         dynamically, checking for the desired condition every second
>         and continuing to the next command in the script as soon as
>         the condition is met.*
>
>     The overlays load iFrames, which can always be cumbersome to work
>     with, but that last paragraph was the key. I went ahead and
>     installed Selenium and came up with this real quick:
>
>     open | (url)
>     click | id=toolbar-link-admin-people
>     waitForElementPresent | xpath=//iframe[contains(@title, 'People
>     dialog')]
>     selectFrame | xpath=//iframe[contains(@title, 'People dialog')]
>     click | xpath=//ul[contains(@class, 'action-links')]/li/a
>
>     Like wise if you want to click the Permissions tab, change the
>     last click to :
>
>     xpath=//ul[contains(@id, 'overlay-tabs')]/li[last()]/a
>
>     Considering every element doesn't have an ID, I decided to use
>     xpath, as I know that.
>
>     Tested in FF 26 with Selenium IDE 2.5.0 on local D7 site as well
>     as a hosted one.
>
>     Jamie Holly
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20140127/0a9116ea/attachment-0001.html 


More information about the support mailing list