Hi Team,
Am automating .NET Windows forms using QTP 10.0 and Test advantage 10.3.0.0.
Application uses Net advantage controls and Object identification works fine in the active window(Visible window). However am facing issues in identifying the objects where the objects are not visible in that window. I used the workaround like scroll down to make object visible .
I need to know is that the correct way or is there any settings or any othere way of identifying the object without scrolling the window.Usally its seen that QTP identifies the object in the page irrespective of scroll down.
Thanks in Advance
Hi Maulik,
Its very simple, Try to use DOM concept and it should work.
In your case please objCmb.object.Focus
For most of the objects you try uinsg object.Focus rather than .SetFocus. Its been working great for us.
Please do let us know if still it doesnt works
Thanks
Nooruddin
Maulik,
It is expected that the combo would scroll into view and not out view. As I didn't reproduce this in my test, let me know what version of TestAdvanage and what version of NetAdvantage you are using and I will test this again.
No, it is not working even without that statement. The application scroll bar moves up automatically so I had included this line to avoid auto up scrolling.
Maulik
If you want the combo to be scrolled into view, why are you changing the proxy setting to set AutoScrollIntoView to false? If you remove that line of script does your script work as expected?
The script is
Set objCmb=SwfWindow("xxx").SwfWindow("yyy").SwfComboBox(oDesc)strIndex=strInput-1strSelectVal = objCmb.GetItem(strIndex) SwfWindow("xxx").SwfWindow("yyy").SwfObject(oDesc2).VScroll micLineNext , 2 objCmb.SetProxySetting "AutoScrollIntoView" , FalseobjCmb.SetFocusobjCmb.Select strSelectVal objCmb.Type micTabwait(2)Set objCmb = Nothing
Screenshot of the application is attached.
While execution of script after "objCmb.SetFocus" step, the vertical scroll bar moves up automatically.