12 years ago
Unwanted error line automaticly created in log.
Here's a (jscript) function I use to check whether an object on a webpage does exist.
In this case the button with the specific name (name 'LocatieZoeken_1Button') does not exist so the 'if' part will run, not the 'else'part.
function exist(){
var iexplore;
var page;
var all;
iexplore = Aliases.iexplore;
Browser = Sys.Process("iexplore");
page = Browser.Page("*")
all = page.document.all;
A1 = all.Item("LocatieZoeken_1Button")
if (A1.Exists == false){
Log.warning ("Button Link(0) bestaat niet");
}
else{
A1.Click();
}
}
So, this object (button) does not exist and the log.warning is correct as expected.
But: before this log.warning an automatic log line is created:
"Unable to find the object Item ("LocatieZoeken_1Button"). See Additional Information for details."
Is it possible to let this line NOT be created? I only want my custom log line be shown/created.
Strange thing is when I create a keyword test that does the same thing, onle the log.warning is created.
The "Unable to find the object Item..." line is not created.
Thanx,
Arjon.
In this case the button with the specific name (name 'LocatieZoeken_1Button') does not exist so the 'if' part will run, not the 'else'part.
function exist(){
var iexplore;
var page;
var all;
iexplore = Aliases.iexplore;
Browser = Sys.Process("iexplore");
page = Browser.Page("*")
all = page.document.all;
A1 = all.Item("LocatieZoeken_1Button")
if (A1.Exists == false){
Log.warning ("Button Link(0) bestaat niet");
}
else{
A1.Click();
}
}
So, this object (button) does not exist and the log.warning is correct as expected.
But: before this log.warning an automatic log line is created:
"Unable to find the object Item ("LocatieZoeken_1Button"). See Additional Information for details."
Is it possible to let this line NOT be created? I only want my custom log line be shown/created.
Strange thing is when I create a keyword test that does the same thing, onle the log.warning is created.
The "Unable to find the object Item..." line is not created.
Thanx,
Arjon.