| || |
Issue with Web Testing
I'm hoping someone will be able to help me out. I am currently trying out TestComplete 5 to determine if it will be able to work with my web application for which I would like to implement some automated testing. The application was developed in vb.net and makes use of master pages (which makes for some interesting object names...).
I have been able to write scripts to open up the login page in firefox and click on the login button to get to the main page. However it doesn't seem that this page is loading completely before attempting to click on a menu item. I added a .wait on the page, but it doesn't seem to help. When I look at the object browser for the page after script execution, most of the pages elements are missing. What's interesting is that if I step through the tests, all of the elements are there and the menu item is successfully clicked. Originally, I thought it might have had something to do with the object mapping, but as you can see I have removed the object mapping and am using the generic object name as generated through TestComplete.
Any ideas as to what command I need to implement in order to get the page to load properly before moving on to the next command? I have posted my code below. Thanks in advance for any assistance...
Set p = TestedApps.Items(0).Run
Set w1 = Aliases.firefoxConentWindowBody
If Not p.Exists Then
Call Log.Error("App in firefox was not launched")
'add a wait so that the page loads before we check for it
'load the browser to the App login page
'Login using the AutoLogin button
Sys.Process("firefox").Window("MozillaUIWindowClas s", "root user : : App - Mozilla Firefox", 1).Window("MozillaWindowClass", "", 1).Window("MozillaWindowClass", "", 6).Window("MozillaWindowClass", "", 1).Window("MozillaContentWindowClass", "", 1).Window("MozillaWindowClass", "", 1).Page("http://localhost/Shamu/User/View.aspx?id=1").LI.Item("menu_root_list_4").Click ()
**UPDATE** I have been able to get around this by adding the BuiltIn.Delay call. Please let me know if anyone knows of a better way to get around this!
Re: Issue with Web Testing
Please take a look at the following official TestComplete newsgroup thread: