fiuba08 / robotframework

Automatically exported from code.google.com/p/robotframework
Apache License 2.0
0 stars 0 forks source link

Sleep function doesn't work on FOR loop #1705

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
A. Environment:
- Win Vista 32 bits
- Python 2.7.6
- Robot framework 2.8.4

B. Set-up
1. Resource file:
-----
*** Settings ***
Documentation       This is the resource file for Google test suite.

Library             Selenium2Library    

*** Variables ***
${SERVER}         http://google.com.vn
${BROWSER}        ff
${DELAY}          0

*** Keywords ***
Open Browser To Login Page
    Open Browser    ${SERVER}     ${BROWSER}
    Maximize Browser Window
    Set Selenium Speed    ${DELAY}
    Login Page Should Be Open

Login Page Should Be Open
    Title Should Be    Google

Submit Credentials
    Click Element    xpath=//*[@id="gbqfsa"]

Input Search     [Arguments]     ${name}      
    Input Text   name=q          ${name}

Submit Search
    Click Element   xpath=//*[@id="gbqfb"]/span
-----

2. test case file:
----
*** Settings ***
Documentation       This test case for looping and condition.
...
...
Resource            resource_google.txt
...
...
Library           String
Suite Teardown    Close Browser

*** Test Cases ***
For-Loop-In-Range
    @{ITEMS}    Create List    12    34    56
    : FOR    ${name}    IN  @{ITEMS}
    \    Log    ${name}
    \    Open Browser To Login Page
    \    Input Search   ${name} 
    \    Submit Search
    \    Sleep 0.5
    \    Tear

*** Keywords ***
Tear
    Close Browser
----

C. Steps:
1. Execute test case file: pybot <test case>
2. Observe the Window screen
3. Observe the result in cmd screen

D. Expected result:
1. System allows execute command line.
2. 
- Firefox browser are loaded and filled text "12".
- Then, hold browser within 0.5s and close.
3. No error in cmd screen result.

E.. Observe result:
1. System allows execute command line.
2. 
- Firefox browser are loaded and filled text "12".
- Then, close browser.

3. The screen displays error: 
"For-Loop-In-Range
No keyword with name 'Sleep 0.5' found."

Original issue reported on code.google.com by daoquang...@gmail.com on 7 May 2014 at 8:10

GoogleCodeExporter commented 9 years ago
You have only one space between sleep and 0.5 - two or more spaces is the 
separator.

Original comment by mikko.ko...@gmail.com on 7 May 2014 at 10:27

GoogleCodeExporter commented 9 years ago
Hi Mikko,

 Yes, just 1 space between "sleep" and "0.5"

Thanks

Original comment by daoquang...@gmail.com on 8 May 2014 at 1:08