2014-11-02 55 views
0

我要更新配置文件工作,教育,基本信息,联系方式信息(accounts.google.com)点击“编辑”按钮,使用硒黄瓜红宝石

我的文件“Testcases.feature”

方案:用户可以为工作

更新信息,因为现有的网站

许多“编辑”按钮,当我运行

Given I launch "https://accounts.google.com" page 
When I fill in "Email" with "[email protected]" 
And I fill in "Passwd" with "[email protected]" 
And I click on "signIn" button 
And I click on "Edit profile" link 
And I click on "Edit" button 
Then I should see text "abc..." 

我无法点击“编辑”按钮CMD:cucumber -r features features\Testcases.feature - >下面出现错误:

我点击 “编辑” 按钮#特性/ step_ 定义/ lib_web.rb:9 无法找到按钮 “编辑”(水豚:: ElementNotFound) ./features/step_definitions/lib_web.rb:10:in /^I click on "(.*)" button$/ ' features\Testcases.feature:65:in我点击“编辑”按钮”

+0

请告诉我你使用选择的编辑按钮的代码? – bcar 2014-11-03 04:47:32

回答

0

如果有与‘编辑’标签,我会建议增加新的步骤,点击多个按钮使用选择器作为explained here,然后在你的故事中使用它:

When I click within "#buttonId" 

您可以使用任何其他您认为更合适的选择器替换“#buttonId”。

0

只需使用在这里如下

within "#specific area" do 
    click_button "edit" 
end