Hi,
Testing Windows 10 (10162) and Edge browser. Using Ranorex 5.4.0.24580.
If you have a Form object for the Browser, such as IE, you can do MyForm.Maximize.
So I have a WinApp object that represents my Edge browser. You cannot do MyWinApp.Maximize. Is there another easy way to maximize it? I ended up writing code to get the current state, and if the state was not maximized to find the Maximize button and click that. Works, but I thought that was more work than just ".maximize".
Aracknid
How to Maximize the Edge browser?
Re: How to Maximize the Edge browser?
Hi,
Try to send shortcut ALT + Spacebar + X to Edge window (found it here
http://solverbase.com/w/Edge_Browser:_F ... rtcut_List )
Try to send shortcut ALT + Spacebar + X to Edge window (found it here
http://solverbase.com/w/Edge_Browser:_F ... rtcut_List )
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: How to Maximize the Edge browser?
Hi,
you could try the following within your user code. There is an attribute ('State') on the WinApp which could be set.
or
Please let me know if this worked out for you.
you could try the following within your user code. There is an attribute ('State') on the WinApp which could be set.
Code: Select all
repo.WinApp.Self.Element.SetAttributeValue("State",WinForms.FormWindowState.Maximized);
Code: Select all
repo.WinApp.Self.As<Form>().Maximize();
Re: How to Maximize the Edge browser?
Interesting, this code worked. I would have thought it would have thrown an exception because a WinApp is not a Form, but perhaps under the covers it is...
Thanks,
Aracknid
Code: Select all
Dim MyWinApp as Ranorex.WindowsApp
MyWinApp = Host.Local.FindSingle("./WinApp[@AppID='MicrosoftEdge']")
MyWinApp.As(Of Ranorex.Form).Maximize
Aracknid
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How to Maximize the Edge browser?
WinApp indeed is no Form, but the element you are taking about supports multiple capabilities, WinApp and Form being amongst them. You can see all the capabilities supported and their attributes in Ranorex Spy.Aracknid wrote: I would have thought it would have thrown an exception because a WinApp is not a Form
The WinApp adapter is just one way of looking at the element, providing a set of properties and methods the element supports. The Form adapter is a different way of looking at the element.
For more information on the terms capability and adapter and how to use them, see following section in the user guide:
http://www.ranorex.com/support/user-gui ... apter.html
Regards,
Alex
Ranorex Team