I am doing some non-regression tests with Perl package Selenium::Remote::Driver. I would like to recover a windows Confirm Box . I know i have to execute some Javascript snippet code to recover it. Usually, i can get a web page behaviour not include in Selenium::Remote::Driver package with some Javascript code ( Compare below ) using a selector. But in my case , i can't recover my "Confirm Box" because i can't inspect my "Confrim Box" element. SO i can't use Developer Tools to find a selector or a xpath.
PS: I don't want to know if this alert ("Confirm Box ") exists. I know it's in my web page and i don't want to assert it.
I have to use following Javascript snippet also for example:
my $script = q{
var arg1 = arguments[0];
var elem = window.document.findElementById(arg1);
return elem;
};
my $elem = $driver->execute_script($script,'myid');
$elem->click;
And below part of code which contains my "Confirm Box" :
if (confirm("Are you sure?")) {
var promises = [];
CW.showLoadingPanel();
$.each(dataGrid.getSelectedRowsData(), function() { ... }
...
};
So how can i do with this issue ?