# Clicking on wrong element

**URL:** <https://forum.robotframework.org/t/clicking-on-wrong-element/1080>\
**Category:** SwingLibrary\
**Created:** [8 December 2020 09:12 UTC](https://forum.robotframework.org/t/clicking-on-wrong-element/1080 "2020-12-08T09:12:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![arvi](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@arvi](https://forum.robotframework.org/u/arvi)\
**Post date:** [8 December 2020 09:12 UTC](https://forum.robotframework.org/t/clicking-on-wrong-element/1080/1 "2020-12-08T09:12:42Z")

</div>

I have a Java Swing Desktop Application. I’m using Robot Framework SwingLibrary to automate the desktop app. I have an usecase where I need to select ‘item x’ from Popup menu. Here is my keyword:  
‘SwingLibrary.Select From Popup Menu popuppanel Select|Mode’

This keyword works fine in most of the windows test machines. But it fails in one of the windows test machines where it always clicks ‘item x-1’ instead of ‘item x’. It appears that Jemmy is using (x,y) coordinates to select items instead of selecting as objects.

I tried changing the zoom settings of the desktop-app, display resolution of the OS but nothing seems to work.

Is there other way to operate the popupmenu apart from the keywords provided at [https://robotframework.org/SwingLibrary](https://robotframework.org/SwingLibrary). For eg., in web applications we can use Jquery executor to operate directly on the DOM. Is there a similar way to access the popup menu items in Swing Library? Or are there better options?
