Click here to Skip to main content
15,746,534 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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",
                              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:
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.
Updated 28-Feb-15 19:32pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900