Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6056895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:25:41+00:00 2026-05-23T08:25:41+00:00

I have a cucumber step where the file gets downloaded, but i am unable

  • 0

I have a cucumber step where the file gets downloaded, but i am unable to click the save button in the dialog box that a browser provides, with cucumber step.

I have found some pages which solves the similar kind of problems, but it didn’t solve mine

How to test a confirm dialog with Cucumber?

I have included this cucumber step for file download

When /^I confirm a js popup on the next step$/ do
  page.evaluate_script("window.alert = function(msg) { return true; }")
  page.evaluate_script("window.confirm = function(msg) { return true; }")
end

But didn’t work.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T08:25:42+00:00Added an answer on May 23, 2026 at 8:25 am

    Did you try the page.driver syntax?

    i.e., from: How to test a confirm dialog with Cuccumber?:

    When /^I confirm popup$/ do
      page.driver.browser.switch_to.alert.accept    
    end
    
    When /^I dismiss popup$/ do
     page.driver.browser.switch_to.alert.dismiss
    end
    

    ian.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For a cucumber step, I know that a particular ul element should have 5
I have a step definition in my cucumber test suite that authenticates the user
I have a cucumber step that recently started failing when an   was added
I have a cucumber step that involves the following: When /^I select from the
I have a step in one of my cucumber features called Then the director
I have a step definition cucumber like this find(div#cycle_form table).should have_content(append_row_to_table_tag(day_num, hour, hour_night)) Method
I have been pulling my hair out because of this. My cucumber step clicks
I have 2 cucumber scenarios that simulate paperclip image upload. I want to remove
I have around 30 scenarios that all bar one require this step to be
After running bundle update I have suddenly found that my cucumber tests are failing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.