googleid_102416
13 years agoContributor
[Bug?] NativeWebObject.Find fails in Chrome 24 and Firefox 18
I'm trying to log into Google account using this form https://accounts.google.com/Login
When I search for Email and Password inputs using NativeWebObject.Find function in IE9, it works perfect. But this function returns an unexacting object in Chrome 24 and Firefox 18. Is it TestComplete's bug?
Please see my code below. (sorry for bad formatting, I don't know hot to insert pretty formatted code into this crappy forum)
function Test1()
{
var test_user = 'fakeemail@gmail.com';
var test_pwd = 'fakepassword';
var browser = 'iexplore';
// var browser = 'chrome';
// var browser = 'firefox';
// Run browser
if(!Sys.WaitBrowser(browser).Exists)
Browsers.Item(browser).Run();
var browser = Sys.Browser(browser);
var page = browser.toURL("https://accounts.google.com/Logout");
// Login
browser.toURL("https://accounts.google.com/Login");
// Use credentials to log in
page.NativeWebObject.Find("id", "Email", "input").SetText(test_user);
page.NativeWebObject.Find("id", "Passwd", "input").SetText(test_pwd);
page.NativeWebObject.Find("id", "signIn", "input").Click();
page.Wait();
}