Forum Discussion

googleid_102416's avatar
googleid_102416
Contributor
13 years ago

[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



 


// 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();


}


  • Hi,


     


    Could you please check the version of Chrome and Firefox installed on your computer? I'm pretty sure that they were updated to the latest versions. To allow TestComplete to work with them, you need to install the patches.


     

  • It does not work in Chrome 24 and Firefox 18. It does not work in Chrome 25 and Firefox 19 even with the patches. Would you like to run the script on your end?

  • Hi Alexander,


     


    I've tried your code on my computer with Chrome 25, and it worked fine. Please make sure that the SmartBear TestComplete extension is enabled on your computer. BTW, are you using TestComplete 9.20?


     

  • Yes I use testcomplete 9.20. This still doesn't work on my end, but I completelly switched to xpath, which is more flexible and seems to work better.