mcdcorp / opentest

Open source test automation tool for web applications, mobile apps and APIs
https://getopentest.org
MIT License
453 stars 109 forks source link

Window handles in Opentest #470

Closed ShravaniKondra closed 3 years ago

ShravaniKondra commented 3 years ago

Hi, Is there any way to get Window handles in Opentest?

adrianth commented 3 years ago

If you need to identify Win32 windows handles, your best bet is to create a custom keyword for that and use JNA (Java Native Access) to call the native Win32 APIs. Let me know if this is what you want to do and I can provide some sample code.

ShravaniKondra commented 3 years ago

Basically I wanna know how to get sizes of the chrome instance opened. like height and width of window

adrianth commented 3 years ago

Have you tried to experiment with the ReadElementAspect keyword? You could look at the body element to determine the size of the whole page, if that's what you're after. Of course, if the body element has a margin, then it might not be what you need (depending on how precise you need to be).

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.