I’ve got a similar situation where I have to pick a file from the user’s system, and Selenium doesn’t handle that. You might be able to modify my approach to fit your needs.
My approach is to get the window handle before I perform the click that brings up a dialog for the picking the file. Then I get selenium to give me the handles and I weed out the one that I already had, so now I know the handle for the new window. I use Python, and use it to work with the window based on the handle, and have python pick the file and click the submit button, then I let Selenium go back to doing what it needs to do.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/63591daa-c2b2-4fbd-96f1-37f30c1b4c32%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
// Perform threaded Enter keyboard event
public static String performThreadedEnterKeyboardEvent() {
Runnable r = new Runnable() {
public void run() {
try {
Robot r = new Robot();
r.delay(15000);
r.keyPress(KeyEvent.VK_ENTER);
r.keyRelease(KeyEvent.VK_ENTER);
} catch (Exception ex) {
ex.printStackTrace();
}
}
};
// Wake up the thread and perform the operation
Thread t = new Thread(r);
t.start();
return "Pressed Keyboard Enter key using a different thread";
}
--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/eDqPiYoJ9-Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/8ff59b31-8a07-4223-81b5-a74acc925f3f%40googlegroups.com.