I launch the browser using System.Diagnostics.Process.Start("www.google.com"); Essentially in this way, because I use some extensions in the process. The question is how to set the static size of the browser window? I know that the built-in browser has a method that is responsible for the size of the window.
- 2Process.Start launches the default browser; it cannot know that the browser has a special method. If you need tweaking, run a specific .exe by name and transfer the necessary parameters. - VladD
- @VladD you talked about this ProcessStartInfo startInfo = new ProcessStartInfo ("C: \\ Program Files (x86) \\ Google \\ Chrome \\ Application \\ chrome.exe"); startInfo.WindowStyle = ProcessWindowStyle.Minimized; Process.Start (startInfo); startInfo.Arguments = "www.northwindtraders.com"; Process.Start (startInfo); ? How to set a specific window size? - cruim
- Well, you said that the browser has a method that is responsible for the size of the window. What is this method? This method should be used. - VladD
- @VladD I meant that this method is in the browser built into vs and in seleniuma. - cruim
|
1 answer
Alternatively, you can like this:
Process.Start("C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe", "--window-size=800,600 --window-position=0,0 --app=\"http://www.google.com/\""); - Very similar to what I was looking for. The question is whether it is possible to set the starting position of the window (for example, the upper left corner). - cruim
- one@cruim Yes. Edited the answer. - 123_123 1:01
|