Forum Discussion
So, I'm unclear... is the item selected or not?
The reason I ask... is it possible that the problem is not in selecting the item but in the following steps? Please post a screenshot of your code as it stands right now and corresponding log results... include in the log the "additional info" tab for the error.
The drop down item is no selected. I had attached the screenshot of the steps. It scrolls in to view the drop down and then it slides down.
- tristaanogre6 years agoEsteemed Contributor
Since you're using "FindChild" for your work, the fact that there are two components with the same mapped name shouldn't affect it...
HOWEVER, if you have two components with the same object identifier so that FindChild isn't always finding the one you want (which could also be why two components map as the same object), then that would be certainly the issue. You should use more than just "ObjectIdentifier" as the property for identification... you might need to see if there are other properties to add to make the identification more unique.... that applies to the mapping as well.
- tristaanogre6 years agoEsteemed Contributor
OK... so... I see right away part of the problem.... each time you call "FindChild", you're returning another handle to the same object. So, it's possible that the FindChild is calling some sort of refresh which re-scrolls the screen.
Since the drop down control IS mapped (MappedName in the properties), there's no need to do a FindChild. Simply call the Aliased object.
Alternatively, use FindChild to find the object and assign the result of FindChild to a variable. Then, use that variable to call "ClickItem". That way you're working with the same memory handle of the object rather than two different ones.
- amit_bansal6 years agoOccasional Contributor
Thanks for your effort. I think the issue is that two elements have save mapped name and that is causing this issue.
- amit_bansal6 years agoOccasional Contributor
I was trying to use the mapped name as suggested by you (Considering Find Child was refreshing and scrolling the modal window). But mapped name refer to two different elements. I tried deleting the mapped names and saving different mapped names for the two elements. They again acquired same mapped name.
- amit_bansal6 years agoOccasional Contributor
I have tried saving object to a variable and then running code snipped using that variable but it always scroll down the element and result remains the same and log message is again "There was an attempt to perform an action at point (47, 15) which is transparent or out of the window bounds.". In my opinion, other case could be the element is coming behind the footer that is a panel and cursor is clicking on the footer panel.
- tristaanogre6 years agoEsteemed Contributor
What you need to do then is work with your NameMapping and make sure that the objects are identified uniquely. Basically, what's happening is that your mapping is not specific enough... that there are two components on screen that match your mapping. You will need to correct this. This will take time. Look at ALL properties of the components.
ALSO... NameMapping works from the hierarchy as well... so, if there are two different components, they must have different parent objects. It's possible that you have Extended Find turned on for your component which is why it's finding both items as the same mapped item.
The same is the case for your FindChild... you are not being unique enough in the criteria you are using for finding the child object. You may need to start with a different parent, or add additional property/value pairs... or both.BUT... the root cause of the problem, as you determined, is that your methods for finding the component are not specific enough to uniquely identify it. Fix that... and your problem goes away.
- amit_bansal6 years agoOccasional Contributor
I had mapped them uniquely but now the issue I am facing is that the element is coming behind the transparent footer panel and when curser clicks on it, it clicks on panel rather than clicking on the element.
- tristaanogre6 years agoEsteemed Contributor
Then you need to scroll the element so that it scrolls to the top of the page... Make sure that scrollIntoView has the "true" parameter... and I would actually put that on the modal itself, not just the drop down control.
Related Content
- 5 years agojonathon
- 3 months agoCreepzster
Recent Discussions
- 3 hours agoSubhraDas
- 22 hours agotramuntana