0

I am creating a test suite that automatically runs some of the pages that we have on our internal web application. Problem I am running into is there is one step of the test that I do need the user to manually complete. Is there a way to inform the user via a forced popup or something during the test that can tell the user "Now you need to do this to continue the test"? I am continuing to try to find a way to automate the step but until then this would be a temporary fix.

Thank you in advance!

Kevin Fauver
  • 561
  • 2
  • 8
  • 16
  • This has nothing to do with Selenium, how are you running your tests? I.e if it's a console application, this is specifically about doing this in a Console app... – Arran Jan 30 '15 at 22:29
  • Actually this has not even hit the console application portion. I am writing selenium to automate walking through our claim process and part of it requires the choosing of a file (which then turns into an OS thing). Because choosing a file is not web based, selenium can't do it or atleast so ive read all over SO. So I need to force an alert that says "please choose a document to continue the test process". Has nothing to do with a console app... – Kevin Fauver Jan 30 '15 at 22:50
  • 1
    It also has nothing to do with Selenium. Use a configuration file. It's the same problem, and ultimately same solution, as passing any parameter or piece of data into something like this. Use a configuration file that has the path to use. Alert hacking is not the way to do this. You'd possibly do the same in order to automate against different environments, different users, different databases. – Arran Jan 30 '15 at 22:54
  • Like I said, temporary fix. Right now im using this for just me. But I am looking for other solutions. What you are suggesting I have thought about but I ultimately am not sure how to implement that and am looking into it while I go fix other portions of my scripts. And I am using a config file to automate different users/environments/databases, but I just don't know how I would have the "choose files" functionality work considering it is not web based once the "Open" dialog appears. Im open to it if you know how how to grab the file or can point me in the direction of the answer – Kevin Fauver Jan 30 '15 at 23:23

1 Answers1

1

You could see the answers to this question about executing scripts and use window.alert.

js.ExecuteScript("window.alert('Please enter the foo in the bar')");

Combine this with waiting for a condition to check that the action has completed. In the case the action was not performed correctly, you can Assert.Inconclusive("Manual action did not resolve as expected") to signal to the test developers that the test needs fixing, or the analysts that the results should be ignored.

Community
  • 1
  • 1
maxwellb
  • 13,366
  • 2
  • 25
  • 35