tebelorg / RPA-Python

Python package for doing RPA
Apache License 2.0
4.96k stars 669 forks source link

use document for context - checking if still a problem and scenario to do this #519

Closed rcfcu2000 closed 3 months ago

rcfcu2000 commented 9 months ago

The mainframe_context may not work in all cases, in my case, the html page has js function which triggers a pop up div, and present() could not find the element, my investigation shows that mainframe_context is the cause of this problem.

If I use: document.evaluate('//*[@class=\"bosschat-chat-input chat-global-message boss-chat-editor-input\"]',mainframe_context,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null).snapshotLength

length is 0

document.evaluate('//*[@class=\"bosschat-chat-input chat-global-message boss-chat-editor-input\"]',document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null).snapshotLength

length is 1

and mainframe_context is different than document

image
kensoh commented 3 months ago

Hi @rcfcu2000, sorry for late reply I just got to work on GitHub issues! Is this still a problem?

kensoh commented 3 months ago

If it is still a problem, can you share the scenario and your use case and I can see if there is another way to doing what you need?

kensoh commented 3 months ago

Closing issue for now but I will look out for your reply