Not able to access elements in a popup using javascript ElementFromPoint and selenium python

Viewed 53

I can't use xpath to locate the element. The idea is to use the coordinates of an element to find it on the page. Here, I am using elementfrompoint function in javascript (basically passing coordinates of the element) to get the reference of the element. The issue is that if there is a popup window that comes after clicking a button on the page, I am unable to use this elementfrompoint function as it is always returning me the root element of the popup.

Also, there is only a single window (including the popup too), no iframes or frames so I can't switch to a different window or frame. This is happening when I am doing selenium based testing on the salesforce platform and unable to access the elements in the popups that come while creating a new opportunity or a new account.

Any idea what to do?

0 Answers
Related