Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Leandro_P Absent Member.
Absent Member.
520 views

LeanFT - Not being able to capture static or dynamically "Ok" button the dialog / pop-up displayed b

Not being able to capture static or dynamically "Ok" button the dialog / pop-up displayed by web page.
Generates an error code and does not compile (java).

Here is the code snippet:

Button bntOk = browser.describe(Dialog.class, new DialogDescription.Builder()
.ownedWindow(true).childWindow(false).text("Mensagem da página da web").nativeClass("#32770").build()).describe(Button.class, new ButtonDescription.Builder()
.text("OK").nativeClass("Button").build());

The error generated in the IDE eclipse:

The method nativeClass(String) is undefined for the type ButtonDescription.Builder

It's just a web dialogue. I just need to capture the OK button to click

In UFT I could catch the button.
In LeanFT it did not work.

 

Could anyone help me with some dynamic code that captures the buttons of a dialogue?

 

 

 

0 Likes
2 Replies
Aditya2
Visitor.

Re: LeanFT - Not being able to capture static or dynamically "Ok" button the dialog / pop-

Hi ,

Did you get the answer for the question you asked . I am facing the same issue and i am struck to proceed further.

Thanks,
Aditya
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: LeanFT - Not being able to capture static or dynamically "Ok" button the dialog / pop-

Hi,

 

Have you tried the handleDialog method (has 3 overloads) of the Browser interface?

You can see the documenation of it here:

https://admhelp.microfocus.com/leanft/en/14.50/JavaSDKReference/index.html#JavaSDKReference/com/hp/lft/sdk/web/Browser.html%3FTocPath%3Dcom.hp.lft.sdk.web%7CInterfaces%7C_____3

 

Regards,

Anton

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.