Closed GoogleCodeExporter closed 8 years ago
I don't think so. You must inform an ID. Why can't you put an id? Is this an
alert?
Original comment by s0c...@gmail.com
on 1 Jul 2009 at 10:07
OK.
This is a preexisting code which I will be testing.
To add id, we will have to go through all the code to see wherever its missing
id and rebuild it.
Thanks for the info.
Original comment by vishwaji...@gmail.com
on 1 Jul 2009 at 2:25
No problem. I will remove this issue (since it's not an issue :)
Original comment by s0c...@gmail.com
on 2 Jul 2009 at 3:42
Original comment by sachin.s...@gmail.com
on 29 Jul 2009 at 3:51
Is there a way to click with an alert-yes?
I don't know how to identify the component.
Thank you .
Original comment by paulzi_3...@sina.com
on 5 Aug 2009 at 11:28
In the case where there is only one option available you can dismiss the Alert
window
with the default invocation:
flashApp.call("doFlexAlertResponse", "", "");
(Example below)
This is kind of cheating. It relies on the Alert having window focus and
sending a
blank string as the action. That means it doesn't actually look for which
button to
click, it just sends a Mouse.click().
Example (my apologies if the formatting is messed up):
boolean checkForAlertPopup() {
boolean alertExists = false;
String alertPresent = flashApp.call("getFlexAlertPresent", "", "");
if (alertPresent.equals("true") ) {
logger.error("Alert window is present");
logger.error("alert text present: " + flashApp.call("getFlexAlertText", "", ""));
String clickOK = "";
try {
clickOK = flashApp.call("doFlexAlertResponse", "", "");
} catch (Exception e) {
logger.debug("error: " + e.getMessage());
logger.debug("error: " + e.getCause());
}
logger.debug("clickOK = " + clickOK);
assertEquals("Clicked 'OK' button: ", "true", clickOK);
alertExists = true;
} else {
logger.info("AlertPresent? " + alertPresent);
}
return alertExists;
}
Original comment by logan.hawkes@gmail.com
on 15 May 2010 at 3:49
Original issue reported on code.google.com by
vishwaji...@gmail.com
on 30 Jun 2009 at 7:22