I use in my application, selenium web driver with phantomjs and firefox, for navigate url and get dom of html source and find elements.
for phantomjs, i use hidden firefox. and run in start program with one ip and port.
this is my code:
ShellExecuteA((IntPtr) null, "open", FilePath + "\\phantomjs.exe", "--webdriver 127.0.0.1:8910",
null, 0);
var siteBase = new Uri("http://localhost:8910/");
var capabilities = new DesiredCapabilities {IsJavaScriptEnabled = true};
Driver = new RemoteWebDriver(siteBase, capabilities);
then, navigate url with driver and get page source:
Driver.Navigate().GoToUrl(url);
string html = Driver.PageSource;
so, my program runs very good in windows 7 64bit but, in windows server (2008, 2003) or windows in virtual box, don't run and finish without runing.
I use time out for load page or element, but i don't get any result.
Thank you.