mdu_kay7
11 years agoNew Contributor
Record & Playback: Reference object using their IDs
After recording a keyword test and playing it back with the web page maximized, I noticed that my test fails and the cursor just clicks on incorrect areas of the page.
I then converted the keyword test to a script and I noticed that test is using the web page co-ordinates to find an object. e.g. Aliases.firefox.wndMozillaWindowClass.Click(714, 432);
Is it possible with Test Complete to record a keyword test and reference the web page objects by their IDs and not their positions, so that when I convert the keyword test to a script I get following line of text or similar:
driver.FindElement(By.Id("gbqfq")).Click();
Thanks,
MDu
I then converted the keyword test to a script and I noticed that test is using the web page co-ordinates to find an object. e.g. Aliases.firefox.wndMozillaWindowClass.Click(714, 432);
Is it possible with Test Complete to record a keyword test and reference the web page objects by their IDs and not their positions, so that when I convert the keyword test to a script I get following line of text or similar:
driver.FindElement(By.Id("gbqfq")).Click();
Thanks,
MDu
Hi Mdu,
TestComplete doesn't recognize Firefox properly. Are you using Firefox 28? Make sure that you installed a special patch from here: http://support.smartbear.com/downloads/testcomplete/firefox-patches/