我正在写一个黄瓜功能是我想删除一个类别,但在我删除它之前,我显示一个模式屏幕询问用户他的构象。微博引导模式黄瓜功能
我正在使用twitter bootstrap并使用它们提供的javscript模式。
但是我被卡住了,所以任何人都可以在右边直接帮我解释一下。 这是我的特点至今:
Scenario: Delete category with articles
Given I am logged in as an admin
And I have category titled Paints
When I go to the list of categories
And I push delete button for the Paints category
Then I should get a popup to confirm
我已经实施的必要步骤,功能接受课程的最后一个。 但我不知道如何开始:
我读了一些关于page.driver.browser.switch_to.alert的内容,但现在不要这样做。
有没有人有一些建议?
非常感谢。
我试过这种方法:page.driver.browser.switch_to.alert.accept,但后来我得到没有警报存在(Selenium :: WebDriver :: Error :: NoAlertPresentError) – Niels
我相信tb模式只是一个div ,所以也许在确认模式下验证文本,这不是'正常'js确认 – house9