Selenium keyword - Select Frame random failure

622 views
Skip to first unread message

Arul

unread,
Nov 5, 2009, 7:45:31 AM11/5/09
to robotframework-users
Hi,

I am trying to robot testcase using selenium keywords (http://
robotframework-seleniumlibrary.googlecode.com/svn/tags/robotframework-
seleniumlibrary-2.2.1/doc/SeleniumLibrary.html).

While selecting a iframe using keyword 'Select Frame' it is failing
randomly, once in three times with the error
ERROR: Selenium failure. Please report to the Selenium Users forum at
http://forums.openqa.org, with error details from the log window. The
error message is: Permission denied to get property
Window.seleniumMarker1257413957716

I tried using both id & name while selecting frame, no use. Can
someone help regarding this?

-Arul

Gmail

unread,
Nov 5, 2009, 9:47:38 AM11/5/09
to reacho...@gmail.com, robotframework-users
Have you tried putting a short delay in before hooking the iframe?
I've found more often than not, it's a timing issue with selenium when
I get similar errors.

If that works, you can put in various waitfor messages make sure the
needed elements are there before hooking the frame. If it doesn't,
someone else have any ideas?

- Tim

Pekka Klärck

unread,
Nov 5, 2009, 1:31:23 PM11/5/09
to reacho...@gmail.com, robotframework-users
2009/11/5 Arul <reacho...@gmail.com>:

>
> While selecting a iframe using keyword 'Select Frame' it is failing
> randomly, once in three times with the error
> ERROR: Selenium failure. Please report to the Selenium Users forum at
> http://forums.openqa.org, with error details from the log window.  The
> error message is: Permission denied to get property
> Window.seleniumMarker1257413957716

This looks really strange but sounds also more like a Selenium bug
than a bug in SeleniumLibrary. Have you searched Selenium forums for
information related to this?

I'd also try Tim's suggestion to add a small sleep before the randomly
failing action to see does that have any effect. If that works, you
should definitely change the sleep into some kind of "wait for"
condition as Tim noted too.

Cheers,
.peke

Arulmozhivarman A

unread,
Nov 20, 2009, 9:18:21 AM11/20/09
to Pekka Klärck, robotframework-users
I tried adding sleep before selecting frame, but its not working. while the test is executed i can see the contents of frame got loaded but its failing in select frame.

i searched in selenium forums also but i couldnt able to find anything. is this robot issue or from selenium? or is there any alternative?

Regards,
Arul

Arulmozhivarman A

unread,
Dec 3, 2009, 1:38:12 AM12/3/09
to Pekka Klärck, robotframework-users
Hi,

I tried the same scenario using selenium ide and there Select Frame keyword(comes from selenium) works fine.
When using the keyword Select Frame from SeleniumLibrary, its failing.

I just want to check whether some text is present in the page created with iframe, but if I am using keyword Page Should Contain - text without Selecting frame it is failing with message - Page should have contained text "  ", but not.
Is there any other way to check this without using select frame keyword?(i think no)

I really need to have a test case to check the page is loaded or not. anybody have ideas?

Regards,
Arul

Arulmozhivarman A

unread,
Dec 3, 2009, 5:18:11 AM12/3/09
to Pekka Klärck, robotframework-users
Here is the error i am getting for Select Frame keyword

--------- clip ------------

KEYWORD: SeleniumLibrary.Select Frame pageToBeDisplayed
Documentation:  Sets frame identified by 'locator' as current frame.
Start Time:     20091203 15:07:34.272
End Time:       20091203 15:07:34.375
Elapsed Time:   00:00:00.103
15:07:34.272    TRACE   Arguments: [ pageToBeDisplayed ]
15:07:34.328    INFO    Selecting frame 'pageToBeDisplayed'.
15:07:34.328    DEBUG   Parsed locator 'pageToBeDisplayed' to search expression 'pageToBeDisplayed'
15:07:34.375    FAIL    ERROR: Selenium failure. Please report to the Selenium Users forum at http://forums.openqa.org, with error details from the log window.  The error message is: Permission denied to get property Window.seleniumMarker1259833047564

15:07:34.375    INFO    Traceback (most recent call last):
                 File "/...../robot/lib/SeleniumLibrary/__init__.py", line 805, in select_frame
                   self._selenium.select_frame(self._parse_locator(locator))
                 File "/...../robot/lib/SeleniumLibrary/selenium.py", line 803, in select_frame
                  self.do_command("selectFrame", [locator,])
                 File "/...../robot/lib/SeleniumLibrary/selenium.py", line 201, in do_command
                  raise Exception, data

------- clip------------

Any ideas?

Janne Härkönen

unread,
Dec 11, 2009, 5:40:23 AM12/11/09
to reacho...@gmail.com, Pekka Klärck, robotframework-users
On Thu, Dec 3, 2009 at 8:38 AM, Arulmozhivarman A
<reacho...@gmail.com> wrote:
> Hi,
>
> I tried the same scenario using selenium ide and there Select Frame
> keyword(comes from selenium) works fine.
> When using the keyword Select Frame from SeleniumLibrary, its failing.

Can you attach the relevant part of the script created by Selenium IDE
and your Robot test case. I could try to compare those and see if
there's a functional difference, or if the bug comes from Selenium-RC.

thanks,
__janne

Arulmozhivarman A

unread,
Dec 11, 2009, 6:57:29 AM12/11/09
to Janne Härkönen, Pekka Klärck, robotframework-users
Hi
this problem got solved when i used crome option to open browser. i was using firefox option to open the browser and somehow this caused the error and moreover crome option will give more stable results when compare to other one.(i got this while going through selenium tutorial).

thanks,
arul

Janne Härkönen

unread,
Dec 11, 2009, 7:12:43 AM12/11/09
to Arulmozhivarman A, Pekka Klärck, robotframework-users
On Fri, Dec 11, 2009 at 1:57 PM, Arulmozhivarman A
<reacho...@gmail.com> wrote:
> Hi
> this problem got solved when i used crome option to open browser. i was
> using firefox option to open the browser and somehow this caused the error
> and moreover crome option will give more stable results when compare to
> other one.(i got this while going through selenium tutorial).
>

You might want to consider upgrading to SeleniumLibrary 2.2 series,
where we use Selenium RC 1.0.x, which in turn uses *chrome as default
mode for Firefox.


thanks,
__janne

Arulmozhivarman A

unread,
Dec 12, 2009, 8:01:53 AM12/12/09
to Janne Härkönen, Pekka Klärck, robotframework-users
Sure i will, what is the difference between these two options for firefox browsers?

thanks,
Arul

Pekka Klärck

unread,
Dec 12, 2009, 5:56:10 PM12/12/09
to Arulmozhivarman A, Janne Härkönen, robotframework-users
2009/12/12 Arulmozhivarman A <reacho...@gmail.com>:
In the chrome mode for Firefox has more rights than normally which
makes testing in certain scenarios (especially with https) easier but
would be unsafe in normal usage. Notice that chrome in this context is
not at all related to the Google Chrome browser. Notice also that IE
has similar mode called, if I remember correctly, iehta.

SeleniumLibrary has for some time used chrome/iehta modes
automatically when needed. After Selenium RC 1.0 (used by
SeleniumLibrary 2.2 series) this isn't needed anymore as Selenium uses
these elevated modes by default itself.

Cheers,
.peke
--
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org
Reply all
Reply to author
Forward
0 new messages