Hi there,
I'm trying to write swipe left and right functions for use in a mobile test script to do this id like to know the bounds of the screen on whatever device i'm using.
Could anyone advise me on what the code is for this?
Thanks
M
using usercode to obtain screen resolution
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: using usercode to obtain screen resolution
Hi,
You can for instance use the following code to get the ScreenRectangle of the main form:
Markus
You can for instance use the following code to get the ScreenRectangle of the main form:
var mainForm = repo.YourElement.YourMailForm; var rect = mainForm .ScreenRectangle; // you can also get the length and height Report.Info("bounds: "+rect.ToString());Regards,
Markus
Re: using usercode to obtain screen resolution
Thankyou very much for this.