0

I am working with Phantomjs web diver to get page source .it's working fine on local but when i host webjob on azure then its giving me exception;

OpenQA.Selenium.WebDriverException: Cannot start the driver service on http://localhost:51293/

http://localhost:51293/ this path changed at every run .

amethianil
  • 480
  • 2
  • 7
  • 16

1 Answers1

4

PhantomJS is not supported by Azure Web App/Web Jobs currently. It is noted in the end of following official document.

Azure Web App sandbox - Unsupported frameworks

Other scenarios that are not supported: PhantomJS/Selenium: tries to connect to local address, and also uses GDI+.

Amor
  • 8,325
  • 2
  • 19
  • 21
  • Ok Thanks - amor – amethianil Apr 21 '17 at 20:17
  • Thanks for your feedback. If my reply is helpful for you, please mark it as answer. A thread which has an answer will be easily searched. It will help other community members who encountered a similar problem. – Amor Apr 22 '17 at 02:06
  • 1
    Just publish to a Web/Worker Role instead (Cloud Services), it works beautifully, i'm running PhantomJS with the headless Phantom driver in a small Web Role instance for quite some time, zero issues. – evilSnobu Jun 06 '17 at 07:28
  • @evilSnobu please share your code, I've been trying to make this solution work but haven't managed to arrive at a stable, production quality solution – Jorge Rodrigues dos Santos Dec 15 '17 at 18:50
  • Here's the MVC Controller - https://gist.github.com/snobu/131c210e3b3d79e305de4f5b16f8bef9. Really nothing special, just a Cloud Service with a WebRole. – evilSnobu Dec 21 '17 at 09:22