I have a webBrowser, and a label in Visual Studio, and basically what I\'m trying to do is grab a section from another webpage.
I tried using WebClient.DownloadStrin
ok i will show you how to enable javascript using phantomjs and selenuim with c#
in your main function type this code
var options = new PhantomJSOptions();
options.AddAdditionalCapability("IsJavaScriptEnabled", true);
IWebDriver driver = new PhantomJSDriver("phantomjs Folder Path", options);
driver.Navigate().GoToUrl("https://www.yourwebsite.com/");
try
{
string pagesource = driver.PageSource;
driver.FindElement(By.Id("yourelement"));
Console.Write("yourelement founded");
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
Console.Read();
don't forget to put yourwebsite and the element that you loooking for and the phantomjs.exe path in you machine in this code below
have great time of coding and thanks wbennett