2014-11-02 131 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