Highlighted
Absent Member.
Absent Member.
1645 views

How to locate objects which appear only over mouse hover

Jump to solution

Using SilkTest 17.5

in our WPF application there is a feature e.g. pin & unpin notes. This appear in application when we hover our mouse on notes icon and when mouse is moved away they disappear.

So how do we locate these types of objects ?

Tokci

0 Likes
2 Solutions

Accepted Solutions
Highlighted
Absent Member.
Absent Member.
Based on the tags to this question, you're using .NET scripts in the Workbench along with Silk4NET.

In the Workbench, the default selection mode when using the Identify Object dialog is click. This means you can't interact with the application under test while identifying. You can change this to use a hot key instead (which is what Silk4NET always uses). On the Identify Object dialog, at the top there is a ComboBox labeled "Selection mode". If you change this to "Hot key", another ComboBox appears that lets you select the hot key to use (either Ctrl+Alt or Ctrl+Shift, the same hot keys Silk4NET uses). This way you can interact with your application, and get it into the correct state to locate the object you want to use.

While identifying is in progress, you can also use Alt+Tab to switch focus to your application, if that impacts its behavior.

Does that answer your question?

Andy

View solution in original post

Highlighted
Absent Member.
Absent Member.
Vow! thats exactly what I needed.
Is there any way I can test these also ? because now If I press Test locator it says locator not found.

View solution in original post

0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.
Based on the tags to this question, you're using .NET scripts in the Workbench along with Silk4NET.

In the Workbench, the default selection mode when using the Identify Object dialog is click. This means you can't interact with the application under test while identifying. You can change this to use a hot key instead (which is what Silk4NET always uses). On the Identify Object dialog, at the top there is a ComboBox labeled "Selection mode". If you change this to "Hot key", another ComboBox appears that lets you select the hot key to use (either Ctrl+Alt or Ctrl+Shift, the same hot keys Silk4NET uses). This way you can interact with your application, and get it into the correct state to locate the object you want to use.

While identifying is in progress, you can also use Alt+Tab to switch focus to your application, if that impacts its behavior.

Does that answer your question?

Andy

View solution in original post

Highlighted
Absent Member.
Absent Member.
Vow! thats exactly what I needed.
Is there any way I can test these also ? because now If I press Test locator it says locator not found.

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.
Hi Tokci,

you can use "Test Locator" only when the target is rendered.
So you can not really test a locator behind a hover control, because it has not existence when the mouse is not over the control, and because it disappears when you moves over the SilkTest "test locator" button to test it...

To test it, you need to create a simple testcase to move the mouse over the hover control, and then interact with the locator previously caught with Andy's way.
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.