How to navigate to a "Not Secured" web page using PhantomJS



  • I was trying to navigate to a web page which is not secured.

    When I try to do this using PhantomJS, it's not navigating the web page. I can see that by debugging the code.

    So, how should I navigate to the "Not Secured" web page using PhantomJS?

    Below is my code.

    driver = new PhantomJSDriver(@"C:\Driver\phantomjs\");
    driver.Navigate().GoToUrl("http://xxx.xxx.xx.aspx");
    


  • I was able to do this on .net c# with PhantomJSDriver with selenium web driver 3.1

    [TestMethod]
    public void headless()
    {
    
    
        var driverService = PhantomJSDriverService.CreateDefaultService(@"C:\Driver\phantomjs\");
        driverService.SuppressInitialDiagnosticInformation = true;
        driverService.AddArgument("--web-security=no");
        driverService.AddArgument("--ignore-ssl-errors=yes");
        driver = new PhantomJSDriver(driverService);
    
        driver.Navigate().GoToUrl("XXXXXX.aspx");
    
        Thread.Sleep(6000);
    }
    


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2