burakavcioglu Absent Member.
Absent Member.
508 views

If there is a button

If there is a button or object click otherwise Continue the test.

Is there a similar method in Silk4NET?

0 Likes
3 Replies
Micro Focus Expert
Micro Focus Expert

RE: If there is a button

Hi,

You likely want to use the "Exists" method, for example:

     if (_desktop.Exists("//BUTTON", 5000))
     {
          _desktop.DomButton("//BUTTON").Click();
     }

 

I hope this helps.

-Robert

Highlighted
burakavcioglu Absent Member.
Absent Member.

RE: If there is a button

if (_desktop.Exists("//BUTTON", 5000))
{
_desktop.DomButton("//BUTTON").Click();
}
else{
LogInfo("Not Found");
}

logic is right, but I reasarch framework method?

_desktop.DomButton("//BUTTON").IsClick();

if not, the test will continue
0 Likes
Micro Focus Expert
Micro Focus Expert

RE: If there is a button

Hi,

I'm not quite sure what you are asking.

There is no method named "IsClick" for the DomButton class.

Can you clarify what you want to do?

-Robert
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.