在pycharm中使用for循环检查多个用户名和密码的robotframework

2024-06-25 05:23:13 发布

您现在位置:Python中文网/ 问答频道 /正文

我尝试使用Pycharm检查robotframework中的多个用户名和密码。我用的是Mac EI舰长。 请帮帮我。我正在尝试使用机器人框架指南中给出的方法。还有,有没有可能?或者我必须使用excel表或python文件?请让我知道。 这是我正在尝试的代码:

 *** Settings ***
Library  Selenium2Library
Resource  ../Resources/Common.robot
Resource  ../Resources/Yahoor.robot
Test Setup  Common.Begin Browser
#Test Teardown  Common.End Browser
Library  string

*** Variables ***
${BROWSER} =  firefox
${URL} =  https://login.yahoo.com/config/login?.src=fpctx&.intl=ca&.lang=en-CA&.done=https://ca.yahoo.com/
${PASS} =  ****

*** Test Cases ***
Yahoo Login Check Positive Testing
    [Tags]  Positive
    [Documentation]  Check for positive test
    @{STR}    Create List  user1  user2
    : FOR    ${Item}    IN    @{STR}

    Yahoor.Verify Display
    Yahoor.Input Email-id
    Yahoor.Check Pass Page
    Yahoor.Input Pass Credentials

Tags: httpstestbrowsercomchecklibraryrobotlogin