在这里积累学习中的点点滴滴!

RFS 下拉列表默认值检查以及选择

上一篇 / 下一篇  2018-03-20 11:18:02 / 个人分类:RFS+S2

WEB中的下拉框比较常见,以下是对下拉框的初步尝试操作:
i1SA9]/N7b+H(n;g!\.p01、进入新增页面,点击新增按钮,检查页面下拉框的默认选项为【女】
1e4j0B/lqE02、输入姓名、年龄、电话51Testing软件测试网a)I,J,|7eIC!L
3、下拉框选择课程信息51Testing软件测试网4a Dm+} Z+R B\
51Testing软件测试网_9v fT3GsV
 [Arguments]    ${name}    ${age}    ${phone}
W_J(H.H1\&F;u+Z0    click element    xpath=.//li[@id='SignUp']    #点击学员报名菜单51Testing软件测试网1P4f@[upx"[C6i I
    click element    xpath=.//a[@class='tt_btn tt_right']    #点击新增按钮
HN%@!w"w4w0    Page Should Contain Element    xpath=.//select[@id='Gender']    #进入新增页面51Testing软件测试网;K.o_&t ghRy
    List Selection Should Be    xpath=.//select[@id='Gender']    女    #检查默认性别为女
Ews"jDf'S0    input text    xpath=.//*[@id='RegistrationName']    ${name}    #输入姓名信息51Testing软件测试网+xwvYKn4_s.yEj
    input text    xpath=.//*[@id='Age']    ${age}    #输入年龄信息51Testing软件测试网c%g.r5ML%W/{
    input text    xpath=.//*[@id='RegistrationPhone']    ${phone}  
J[0f"_xpo%]0    List Selection Should Be    xpath=.//select[@id='PeriodId']    请选择51Testing软件测试网Q1|p+cD'\P|"e7v
    Select From List by index    xpath=.//select[@id='PeriodId']    1    #选择课程51Testing软件测试网#f6\~*|;|Y^KHy
    sleep    151Testing软件测试网*]Mp?/kO;Q@e
    click button    xpath=.//*[@type='submit']51Testing软件测试网u0} lt(b g
    Page Should Contain Element    xpath=.//a[@class='tt_btn tt_right']

TAG:

 

评分:0

我来说两句

Open Toolbar