cancel
Showing results for 
Search instead for 
Did you mean: 

Object Spy doesn't focus on dropdown arrow of the desktop application

SOLVED
Highlighted
Occasional Contributor

Object Spy doesn't focus on dropdown arrow of the desktop application

Hi Everyone,

I try to spy on drop down arrow of a desktop application built using power builder 12.5 but it doesn't find it. 

I have tried ClickItem(), wIsdropdownopened function etc but nothing works.

In my application only if i click the arrow the dropdown list expands.

As of now i enter the text as a work around but i really want to traverse through the drop down list.

I'm new to Desktop application testing so an help is apprecioated.

prekar_0-1600999121214.png

It selects the whole box instead of just the dropdown

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Contributor

Re: Object Spy doesn't focus on dropdown arrow of the desktop application

Hi Preker,

 

Alex has given you some good suggestions. Just for the sake of something different you can also look into the image based testing. You can add this dropdown arrow in your image repository and click on it through this approach. Here is a doc to help you out. 

https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/image-based/about...

View solution in original post

5 REPLIES 5
Highlighted
Community Manager

Re: Object Spy doesn't focus on dropdown arrow of the desktop application

Thank you for posting the question!

 

@Marsha_R  @Wamboo @anupamchampati @Reshail , any ideas on how this can be fixed?


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Highlighted
Community Hero

Re: Object Spy doesn't focus on dropdown arrow of the desktop application

Hi,

 

Most probably, the arrow is a part of the control and is not exposed, thus Object Spy cannot identify it.

Two usual workarounds (in addition to the third one that you already implemented;) ) :

a) Focus the control and send it Alt-Down keys combination. Usually this opens the drop-down. E.g.:

control.Focus();

control.Keys("~[Down]");

b) Do a click 2-3 pixels left from the right border of control - this is where the drop-down arrow is rendered. E.g.:

control.Click(control.Left + control.Width - 3, control.Top + control.Height / 2).

 

Does this help?

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
Highlighted
Contributor

Re: Object Spy doesn't focus on dropdown arrow of the desktop application

Hi Preker,

 

Alex has given you some good suggestions. Just for the sake of something different you can also look into the image based testing. You can add this dropdown arrow in your image repository and click on it through this approach. Here is a doc to help you out. 

https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/image-based/about...

View solution in original post

Highlighted
Community Hero

Re: Object Spy doesn't focus on dropdown arrow of the desktop application

You may also be able to traverse the values in the drop down with out actually opening it.  Look in the Advanced view of Object Spy for a value that has an index and that could give you the drop down values directly.

Highlighted
Occasional Contributor

Re: Object Spy doesn't focus on dropdown arrow of the desktop application

Thanks @AlexKaras 

The first option didn't as it told the textbox not visible but the second option worked.

Thanks @Reshail.. The Image based testing was much easier to do as my application contains too many drop down arrows and this helped me to capture all the dropdowns in one screen easily

Thanks @Marsha_R I did try that but only one element (First one) from the list is enabled and others are disabled /hidden

 

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors