Forum Discussion

mdu_kay7's avatar
mdu_kay7
New Contributor
11 years ago
Solved

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