Running Selenium on Azure Web App
<p>I have an Azure Web App that I want to use to screen scrape a website when I call an Action on a controller, like so.</p>

<pre><code>var driver = new PhantomJSDriver();
driver.Url = "http://url.com";
driver.Navigate();
var source = driver.PageSource;
var pathElement = driver.FindElementByXPath("//table[@class='someclassname']");

string innerHtml = "";
IJavaScriptExecutor js = driver as IJavaScriptExecutor;
if (js != null)
{
    innerHtml = (string)js.ExecuteScript("return arguments[0].innerHTML;", pathElement);
}
return innerHtml;
</code></pre>

<p>This works fine locally, however when I upload to my Azure Web App, I get this error</p>

<blockquote>
  <p>Cannot start the driver service on <a href="http://localhost:51169/" rel="noreferrer">http://localhost:51169/</a></p>
</blockquote>

<p>I assume this has to do with firewalls since I need to approve PhantomJS in my firewall settings the first time the app runs. My question is how do I get this to work deployed in Azure? Is it even possible, or do I need to configure this as some Unit Test and run it from within Visual Studio?</p>