Chrome dialog box not recognized by UFT
Category:
Question ID: 109333
1
0

I attempted to use native mode to recognize the pop-up window with no luck. Has anyone been able to find a workaround?

Are there automation tools that might work better with Chrome objects like this one?

Function CheckForChromeDialog()
Dim windowcounter, windowindex, PopUpwindow, PopUpWinObject
CheckForChromeDialog = False
Set CRMPage = CRMPageObject

Set ContinueButton = CRMPage.WebButton(“class:=default-btn x-btn-text”,”innertext:=CONTINUE”,”index:=0″)
Set FinishButton = CRMPage.WebButton(“html id:=show-messages-workflow-button-btn”,”index:=0″)

Set ChromePopUpDialog = Page(“abs_x:=-4″,”abs_y:=-4″,”height:=1014”)
Set ChromePopUpDialog2 = Page(“abs_x:=-8″,”abs_y:=-8″,”width:=1696″,”height:=1026”)
Set ChromePopUpDialog3 = Page(“abs_x:=-8″,”abs_y:=-8″,”index:=0”)
‘    windowcounter = 1
‘    windowindex = “index:=”&windowcounter

waitforload 5
If (not ContinueButton.Exist(1) AND not FinishButton.Exist(1)) Then
For windowcounter = 1 To 2
windowindex = “index:=”&windowcounter
PopUpwindow = “height:=1014,width:=1688”
PopUpWinObject = “height:=934,width:=1680”
Set IPSWindowsObj = Window(“object class:=Chrome_WidgetWin_1″,”object class:=Chrome_WidgetWin_1”).WinObject(“nativeclass:=Chrome_RenderWidgetHostHWND”,windowindex)
Set IPSWindowsObj2 = Window(“abs_x:=-4″,”abs_y:=-4”,PopUpWindow).WinObject(“abs_x:=0″,”abs_y:=72”,PopUpWinObject,windowindex)
‘wait 2
If IPSWindowsObj.Exist(1) Or IPSWindowsObj2.Exist(1) Then

‘                   Dim WindowID, WindowStyle

‘                   WindowID = IPSWindowsObj.GetROProperty(“window id”)
‘                   WindowStyle = IPSWindowsObj.GetROProperty(“windowstyle”)
‘                   Reporter.ReportEvent micDone, “Window Information”,”Window id:”&WindowID&” and Window Style:”&WindowStyle
‘                   ‘IPSWindowsObj.Highlight

‘IPSWindowsObj.Close
SendKeys “{ENTER}”

End If
Next
End If
If ChromePopUpDialog.Exist(1) Then
ChromePopUpDialog.Close

End If

If ChromePopUpDialog2.Exist(1) Then
ChromePopUpDialog2.Close
End If
If ChromePopUpDialog3.Exist(1) Then
ChromePopUpDialog3.Close
End If
Set CRMPage = Nothing
Set ContineButton = Nothing
Set FinishButton = Nothing
Set IPSWindowsObj = Nothing
Set IPSWindowsObj2 = Nothing
Set ChromePopUpDialog = Nothing
Set ChromePopUpDialog2 = Nothing
End Function

Marked as spam
Posted by (Questions: 3, Answers: 0)
Asked on February 19, 2020 10:27 am
886 views
Answers (1)
0
Private answer

Hi Corky,

Dialogs aren't supported in Chrome with UFT, please take a look at this Known Issues page for details. There are some possible work-arounds mentioned, and you might have some luck using Insight recording.

Marked as spam
Posted by (Questions: 17, Answers: 807)
Answered on February 19, 2020 4:09 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top