0

I hope everyone is having a most excellent day and any and all help is appreciated.

I am running an automated Selenium Junit4(remote control) test in internet explorer 7. To do this I utilized the following tutorial: http://qtp-help.blogspot.com/2009/07/selenium-handle-dialogs.html.

The test is being run from my springsource ide on my mac and is being executed through my virtual box ( windows xp sp 3 ) to internet explorer 7. When the test is run, following the directions in the tutorial explicitly, when it gets to the step that is marked with an asterisk:

Thread.sleep(2000);
    String browser = selenium.getEval("navigator.userAgent");
    if(browser.contains("IE")){
        System.out.print("Browser= IE "+browser);
    *   String[] dialog = new String[]{ "Save_Dialog_IE.exe","Download","Save" };
        Runtime.getRuntime().exec(dialog);

I get the error: can not find file or directory

If I call the Save_Dialog_IE.exe inside of a command prompt manually the process runs and interaction with the IE7 browser dialogs are successful. But when attempting to call it while executing the selenium test it does not.

The only step in the tutorial I am not sure I did correctly was placing the executable (Save_Dialog_IE.exe in the project directory). I am not sure exactly where in the project to place the file. I placed it in both the root directory of the project as well as the folder in the project where I created the class for the junit test. A little fuzzy as to exactly where it needs to go.

Anybody got any ideas how to make this work? Or even any idea's as to how to interact with IE7 browser dialogs running a selenium test on a mac to a virtual VMware box running windows xp sp3?

1

1 Answer 1

1

The .exe file needs to be in the same directory as from where your program (its own .exe is run). I'm not sure how it works with selenium, but you may just need to do:

1) The .exe file needs to go in the root of your project. Then you have to get its properties, and make sure that the .exe is copied to the project output. Usually this is the /bin/Debug/ (or /Release/) folder, but I'm not sure how that works with selenium.

Or 2) Put the .exe file along with your selenium test application, wherever that is.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.