C# 으로 엣지 브라우저를 띄우는 실행 프로그램을 만들고 싶습니다.
구글링으로 아래와 같은 소스를 찾아서 해보니까 엣지 브라우저가 실행되고 원하는 url 까지 로드는 됩니다.
using System.Diagnostics;
string url = "https://www.domain.com";
string command = $"start microsoft-edge:{url}";
Process process = new Process();
process.EnableRaisingEvents = true;
process.StartInfo.FileName = "cmd.exe";
process.StartInfo.Arguments = string.Format("/C {0}", command);
process.StartInfo.WindowStyle = ProcessWindowStyle.Minimized;
process.StartInfo.CreateNoWindow = true;
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.Start();
헌데 두가지 문제를 해결을 못하였습니다.
첫번째는, 커맨드 창이 열린 다음 엣지 브라우저가 뜨는데 커맨드창을 닫아버리는 방법을 모르겠습니다.
두번째는, post 혹은 get 으로 파라매터를 url 로 함께 전송하고 싶은데 방법을 모르겠습니다.
전문가 분들의 조언을 구합니다.
감사합니다.
- 혹 커맨드창을 열어서 엣지를 띄우는 방법 말고 다른 방법도 있는지요? 엣지를 바로 띄울수 있는 방법도 있을거 같다는 생각이 들긴 한데;;;;;;