How to open a browser with fixed coordinates

With the Ranorex test tool, I want to open one of the established browsers in "normal" window state with a predefined fixed size. I know that it is possible to open a browser maximized state. From C#, it is also possible to open a window beside this in minimized or normal state, although I am first interested in the recording modules.

What I need is to open i.e. the Google Chrome browser with 400×600 pixels exactly. We need such tests, as the software appearance differs from one resolution to another (app appearance, Web appearance, etc.).

Thank you for your help!
Ahmet Ekrem SABANSenior IT consultantAsked:
Who is Participating?
Garfield SamuelsProject ManagerCommented:
static void OpenChrome()
        ProcessStartInfo startInfo = new ProcessStartInfo();
        startInfo.FileName = "chrome.exe";
        startInfo.Arguments = "--window-size=400,600 " ;

Alternatively you could pass the Arguments string as a parameter.  You also need to ensure that "C:\Program Files (x86)\Google\Chrome\Application" is in your path settings or include it in the file name.

Hope this helps.
Dustin SaundersDirector of OperationsCommented:
Are you testing your web app with location based clicks?

Why not use elementIds?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.