I'm using QTP 9.2 to automate a web application.
For some reason, when I use: Browser().Page().Link().Click
on a link in our web application, the link is clicked ok, but the UI of the web application id deformed (the entire web page is "pushed" to the left leaving a black space on the left, and hidden areas on the right).
I've found 2 ways to overcome this: using sendKeys to activate a shortcut we have for the link,
or using Broser().Page().Link().Object.click
Hasanyoune ever encountered something like this - that after a QTP operation the UI is affected ?
Does anyone know the differece between doing Link().Click and Link().Object.click ?
Thanks Tarun. Unfortuntely I've already tried it
and it didn't work.
I think it has something to do with the DOM structure of the page. We have an older version of our web application, and we don't have any problems there. The new version's DOM is slightly different - instead of using a table as the root element of all the problematic links, there is a DIV element.
Do you happen to know why this might cause QTP to act up like it does now ?
Try to resize Browser manualy.
If controls on the page behave in the same way:
you are right about DOM structure of the page.
You can open defect then.
I guess, QTP is trying to ScrollIntoView the link
to execute click.
And if there is Flowting lay out design of controls -
they will follow Browser's size, displaying themself on by one. (with Table desigh - Table is resizing along with Browser and controls inside of Table - automatically adjust accorningly).
If you are using the same QTP script (and same objects in Repository) with new design - there is another problem.
There is should be different control's ID's, even if names and visual LookAndFeel are seam to be similar.
It normaly happen in life time of application during Rebase. Solution in this case very simple: rerecord script or change object descriptions in OR.
Janna,I think you're right - it does seem QTP performes scrollIntoView before clicking the link - when I do it myself ( Browser().Page().Link().Object.scroolIntoView ) I get the same effect.
The strange thing is that all the links are in view, so I don't understand why scrollIntoView moves anything.
In the previeous implementation (the one with the table) using scrollIntoView does not change the location of the page relative to the browser.
I guess this is a design issue so I'll take it up with our develpoers here.
Thanks for your help.