I know this has most likely been asked before but I don't seem to be able to get it working.
I have a simple bit of code that starts a Firefox browser using a browser profile. This works great.
url_filename = "http://www.dxsummit.fi/#/?include=" + str_freq;
Process pcs = new Process();
pcs.StartInfo.FileName = "firefox.exe";
pcs.StartInfo.Arguments = "-P DXSummit " + url_filename;
pcs.Start();
what I want to do is have the Firefox browser now do a refresh (F5). I have tried various options but with no luck.
If I try
var hWnd = pcs.MainWindowHandle;
SwitchToThisWindow(hWnd, true);
SendKeys.Send("{F5}");
it gets an error as it can not find the MainWindowHandle.
I have also tried
IntPtr hWnd = pcs.Handle;
SwitchToThisWindow(hWnd, true);
SendKeys.Send("{F5}");
this does NOT give me an error but does NOT do anything either
Does anyone have any ideas ????
thanks for the help