Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPA.Windows: library.get_attribute("id:xxx", "Name") api returned value will be intercepted when over some characters size #1187

Open
jay-eb opened this issue Apr 30, 2024 · 7 comments

Comments

@jay-eb
Copy link

jay-eb commented Apr 30, 2024

I'm using RPA.Windows for desktop app automation test and i call library.get_attribute("id:xxx", "Name") to get some element's attribute.The element attribute has over 260 size characters, but the api returned only intercept 260 characters. If I want to get all the characters, what should I do, or is it a bug?

@mikahanninen
Copy link
Member

The RPA.Windows.get_attribute keyword does not have any limitation on return size - the attribute values are directly accessed and returned. I would need to try to replicate the issue with some application that would have a lot of text in the Name attribute.

@mikahanninen
Copy link
Member

Have you checked if any other element attribute contains this long text (with Accessibility Insights tool) ? You could try to use get_text() or get_value() keywords ?

@jay-eb
Copy link
Author

jay-eb commented May 7, 2024

@mikahanninen Thanks for your help!
I use pycharm IDE to debug elements.py and find that the element located by locator has been cut attribute long text, the screenshot below:
企业微信截图_17150516063293
企业微信截图_17150516852739
And I also use 'Accessibility Insights tool' to check the origin 'Name' value.
企业微信截图_17150511612431
Meanwhile get_text() or get_value() keywords return None is this case. Maybe element itself has limitation on attribute.

@mikahanninen
Copy link
Member

Well that might be the limitation in the IDE (that text is cut out). Have you tried to print that value to console for example to see if the whole text is contained ?

@jay-eb
Copy link
Author

jay-eb commented May 8, 2024

Well that might be the limitation in the IDE (that text is cut out). Have you tried to print that value to console for example to see if the whole text is contained ?

I print it on console and you can see it's also cut out.
image
In Accessibility insights tool, its ok.
企业微信截图_17151505718796

@mikahanninen
Copy link
Member

I don't know what kind of launcher that pydevd.py is. Can you try to run it with standard python without any debugger?

@jay-eb
Copy link
Author

jay-eb commented May 23, 2024

@mikahanninen Sorry for delaying reply.
Yes, I also run it with standard python3.9 on terminal with command python demo.py
企业微信截图_17162861486131
The message on console is the output of print(f"content of name: {element_attribute} "). It is also cut out.
It should be
企业微信截图_1716286357808

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants