Cannot change the Timeout in RF 2.5.7

282 views
Skip to first unread message

SMERSH009X

unread,
May 31, 2011, 12:53:26 AM5/31/11
to robotframe...@googlegroups.com
Hi,
I've tried everything under the sun to get my test to stop timing out and getting the  "Timed out after 5000.0ms" error before it's even able to load the site.

Can someone please tell me what needs to be changed in my test below?

Thanks a lot,
-Sam

*** Settings ***
Library         Selenium Library
Force Tags      FunctionalTest
Suite Setup     Start Selenium Server
Suite Teardown  Stop Selenium Server
Test Setup      Login Test Setup
Test Teardown   Login Test Teardown


*** Testcases ***

Registration Using email and password
  Set Default Timeout
  Enter Email  testem...@hotmail.com
  Enter Email2  testem...@hotmail.com
  Enter Password  test123
  Click the Sign Up Button
  Login Is Successful
 


*** Keywords ***
Set Default Timeout
  [Timeout]  1min 10s

Enter Email  [Arguments]  ${email}
  Input Text  email  ${email}

Enter Email2  [Arguments]  ${email2}
  Input Text  email2  ${email2}

Enter Password  [Arguments]  ${password}
  Call Selenium Api  type  css="form[id="register"] input[id="id_password"]"  ${password}

Click the Sign Up Button
  Click Button  Sign Up

Login Is Successful
  Page Should Contain  Watched the video

Login Test Setup
  Open Browser  ${login address}  ${browser}
  Maximize Browser Window

Login Test Teardown
  Capture Screenshot
  Close Browser

*** Variables ***
${login address}=  http://workflowygdfdfd.ru/
${browser}=  ie
${DELAY}=  1

Sajjad Malang

unread,
May 31, 2011, 4:19:49 AM5/31/11
to smers...@gmail.com, robotframe...@googlegroups.com
Have you tried setting the timeout in the settings table?

Here is mine and it works for me.

*** Settings ***
Library         SeleniumLibrary  60 sec  localhost  9676
Library         OperatingSystem
Library         String
Library         Dialogs


--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To post to this group, send email to robotframe...@googlegroups.com.
To unsubscribe from this group, send email to robotframework-u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/robotframework-users?hl=en.



--
Regards,
\Sajjad.

http://www.babycareindia.com

Janne Härkönen

unread,
May 31, 2011, 7:37:21 AM5/31/11
to smers...@gmail.com, robotframe...@googlegroups.com
On Tue, May 31, 2011 at 7:53 AM, SMERSH009X <smers...@gmail.com> wrote:
> Hi,
> I've tried everything under the sun to get my test to stop timing out and
> getting the  "Timed out after 5000.0ms" error before it's even able to load
> the site.
>

You can set Selenium timeout either at library import time like

SeleniumLibrary | timeout=2 minutes

or using keyword Set Selenium Timeout, so you can fix your suite setup
like this:

Set Default Timeout
Set Selenium Timeout 1min 10s

The syntax [timeout ] is used the set the timeout for that particular
keyword, but it does not affect Selenium in any way. You can find more
information in the user guide [1].

[1] http://robotframework.googlecode.com/hg/doc/userguide/RobotFrameworkUserGuide.html?r=2.5.7#user-keyword-timeout


thanks,
--J


--
Janne Härkönen | http://reaktor.fi
http://twitter.com/#!/janneharkonen

SMERSH009X

unread,
Jun 1, 2011, 11:46:33 AM6/1/11
to robotframe...@googlegroups.com, smers...@gmail.com
Great, thanks!
I ended up going with Sajjad's suggestion.
I definitely think the info from this post should get elaborated in the User guide as I spent hours trying the examples in there, and it wouldn't work.

Best,
Sam

Pekka Klärck

unread,
Jun 1, 2011, 4:27:02 PM6/1/11
to smers...@gmail.com, robotframe...@googlegroups.com
2011/6/1 SMERSH009X <smers...@gmail.com>:

Do you have concrete ideas how the User Guide could be enhanced in this regard?

Cheers,
.peke
--
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org

SMERSH009X

unread,
Jun 2, 2011, 3:22:56 AM6/2/11
to robotframe...@googlegroups.com, smers...@gmail.com
Peke,
Assuming that a good number of users of Robot will be using it to drive Selenium, we are used to a default timeout of 30 seconds that comes with Selenium--not 5 seconds. it would have been super helpful if the user guide at least mentioned that I could do something as simple as :

*** Settings ***
Library         SeleniumLibrary  60 sec


Also, Sandeep's suggestion of hacking the Selenium library as a means to "set it and forget it" was useful as well, although I wasn't quite sure how to locate that file on my system.

So to summarize, I just want a clear, Selenium specific, section to permanently change the timeout in my tests.
Thanks!

David

unread,
Jun 2, 2011, 10:27:12 AM6/2/11
to robotframework-users
> So to summarize, I just want a clear, Selenium specific, section to
> permanently change the timeout in my tests.

That sounds better to be documented under SeleniumLibrary project
under whatever docs there are there, I haven't checked.

David

unread,
Jun 2, 2011, 10:28:30 AM6/2/11
to robotframework-users
Forgot to mention in my post, but maybe with a cross reference link
between User Guide and docs at SeleniumLibrary project.
Reply all
Reply to author
Forward
0 new messages