bdd - finding download box element with capybara in cucumber test -


i have link downloads file. click link displays dialog box "save" , "open" option , "cancel" , "ok" button. want find "ok" , "cancel" button cucumber test.

i took below link didn't helped much.

how test confirm dialog cucumber?

 **features code**  , want click "ok" 
 **steps code**  /^i want click "([^\"]*)"$/ |option|   retval = (option == "ok") ? "true" : "false"   page.evaluate_script('window.confirm = function() { return true; }')   page.click("ok") end 

the issue dialogue talking not part of webpage @ all. part of browser. really, part of user interface outside control of webpage.

all can test webpage point of requesting download, browser request subsequently not can script cuke.

sorry.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -