krainevsky
15 years agoContributor
hasAttribute method call fails
Hi
TestComplete 7.52, IE8 (8.0.6001.18702).
1. Turn on Hybrid model at Web Testing project properties window
2. Run IE8
3. Run script below
[JScript]
function Main()
{
var page = Sys.Process("iexplore").Page("*");
page.ToUrl("http://www.google.ru");
page.Wait();
var element = page.document.getElementById("logo");
try {
Log.Message(element.hasAttribute("id"));
} catch (exception) {
Log.Error("Method doesn\'t exist", exception.description);
}
var methods = aqObject.GetMethods(element, true);
while (methods.HasNext()) {
var method = methods.Next();
if (method.Name == "hasAttribute")
Log.Message("Method exists");
}
}
I see error "Method doesn't exist" and(!!!) message "Method exists". Am I wrong or there is a bug? Thanks in advance.
TestComplete 7.52, IE8 (8.0.6001.18702).
1. Turn on Hybrid model at Web Testing project properties window
2. Run IE8
3. Run script below
[JScript]
function Main()
{
var page = Sys.Process("iexplore").Page("*");
page.ToUrl("http://www.google.ru");
page.Wait();
var element = page.document.getElementById("logo");
try {
Log.Message(element.hasAttribute("id"));
} catch (exception) {
Log.Error("Method doesn\'t exist", exception.description);
}
var methods = aqObject.GetMethods(element, true);
while (methods.HasNext()) {
var method = methods.Next();
if (method.Name == "hasAttribute")
Log.Message("Method exists");
}
}
I see error "Method doesn't exist" and(!!!) message "Method exists". Am I wrong or there is a bug? Thanks in advance.