I am using UFT 12.51 to automate a web application in IE11. Here is my scenario:
I need to go through several pages to complete the process that I am trying to automate (more precisely, 9 pages). On page 4, I click on the link that opens the frame (like a popup). I enter the required information and press the button to send information that closes the frame and returns me to page 4 in the browser. My problems arise here: at this stage, the UFT stops recognizing any elements on the page. He takes away that there is a page, but does not recognize that it has child "visible" objects. If I manually click the link again to display the frame and close the frame, UFT will again begin to recognize objects on the page. Is there a way by which I can call the link (I have a URL) to re-open the frame when the link is not visible to UFT? If I can do it,I can close the frame and the objects on the page will be visible again .. I hope
I tried things like "devicereplay", browser.navigate, sendkeys, but none of them work. Unfortunately, due to the nature of my application, I cannot provide any screen prints. Any help would be greatly appreciated as I tried to figure this out for 2 days with no luck.
the code
Dim oDR : Set oDR = CreateObject("Mercury.DeviceReplay")
' Lets get the X and Y chordinates for 'Next Step' button
Dim iX, iY
iX = Browser("MyBrowser").Page("MyPage").Link("NextStep").GetROProperty("x") + 5
iY = Browser("MyBrowser").Page("MyPage").Link("NextStep").GetROProperty("y") + 5
If MyFunction(dCurrVals, sErrorMsg) Then
LOG_ReportEvent "PASS", "Set Investment/Allocate", "Successfully initialised page"
Else
LOG_ReportEvent "FAIL", "Set Investment/Allocate", sError
End If
'Browser("MyBrowser").Page("MyPage").Object.body.doscroll "scrollbarPageUP"
wait(1)
oDR.MouseMove iX, iY
oDR.MouseClick iX, iY, 0
Set oDR = Nothing
Browser("MyBrowser").RefreshWebSupport
Wait(1)
Browser("MyBrowser").Page("MyPage").Link("Search")
'Browser("MyBrowser").Navigate "MyURL"
'Browser("MyBrowser").Page("MyPage").Sync
'Browser("MyBrowser").Page("MyPage").Link
'Wait(1)
'Browser("MyBrowser").Page("MyPage").Link("Search")
'Browser("MyBrowser").Page("MyPage").WebElement("Search").FireEvent "onclick"
Note
For security reasons, I changed the names of the objects, but the above code is just an example of what I tried. dCurrVals- a dictionary object that is pre-populated before a function call
source
share