I got a weird dialog box in web application testing and I am just stuck. Dialog box is a conditional. It displays based on some data we enter. I just need to be able to click OK or press enter if it displays.
I clicked OK while recording. UFT does not add any code and nothing was added to OR. When I spy, it is not recognizing the ok and does not recognize the dialog box. Manually I simply click OK or press enter to handle. Then I wrote the shell way to press enter. It does not do anything.
Set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys "{ENTER}"
Set WshShell = Nothing
How can I handle this dialog box using UFT?
you can you insight object to identify the "Ok" button. in case you are not able to spy it.
If this is the browser's regular dialog (javascript's alert
) UFT supports dismissing it using Browser(...).HandleDialog
.
If this works then it should also have recorded the HandleDialog
step, if it doesn't it may be a defect in UFT, I suggest contacting MicroFocus's support.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.