Selenium Web driver with Azure Web jobs - azure

i have written a C# selenium code which opens browser and takes the screenshot . Code is running fine in my local laptop but when i try to deploy the code on azure webjobs. code fails to run. It may be because of local system has chrome browser installed whereas it is missing from cloud. I have even included the chrome.exe file with my directory but not finding a success. i am stuck and tried many thing but not found a way to proceed .

Selenium is not supported by Azure Web App/Web Jobs currently. It's noted under Unsupported frameworks tags.
Azure Web App sandbox:Unsupported frameworks
Other scenarios that are not supported:
PhantomJS/Selenium: tries to connect to local address, and also uses
GDI+.

Related

How do I setup and deploy a local execution app for Google smart home action?

I am implementing the local execution functionality for my google smart home action. I am following the steps in this link:
https://developers.google.com/actions/smarthome/develop/local
I have already configured the scanning data in the console, and now I am trying to deploy my local execution app. I know how to program in javascript, I have created a couple of firebase functions, but I am not an expert in node.js. I don't understand how to setup and run this javascript app.
I tried to run it on the browser, but it says it cannot find "require", and I read that node.js is not supposed to run on client side. In the link above, it says to create an index.html, that declares the "local_execution.js". Is this javascript module going to run on client side? Can someone point me in the right direction? Maybe explain how to setup the app directory.
Thank you in advance,
Henrique
The best place to get started would be with the local home sample app on GitHub. This sample includes both a local execution app and a compatible virtual device, with instructions to get it compiled and deployed.
For testing, you need to host the web app (HTML/JavaScript) in a location that's accessible to your Home device. This could be a local dev server or something like Firebase Hosting (the sample has instructions for both). The hosted URL goes in the console under Test > On device testing.
I tried to run it on the browser, but it says it cannot find "require", and I read that node.js is not supposed to run on client side.
The Home devices run a browser-based (Chrome) environment, so your JavaScript must be compatible with the browser. If you use Node programming paradigms (e.g. importing modules using require) in your code, you need to use a bundler tool such as Webpack or Parcel to package the code for the browser. The sample uses Webpack to accomplish this.
Side Note: You can't run even a properly packaged local home app in the browser on your development machine because the local home SDK only exists on Home devices.

Running Selenium in Azure Function

I want to periodically scrape a website with Selenium and a headless PhantomJS driver.
My boss wants me to run it "in the cloud" for reasons, and a serverless Azure Function looks like it could be a useful way to do it, instead of having to run a VM or something.
I've got my VS.net code to do the scraping mostly done, but I just realized that I'm not sure if I can actually deploy it as a function, since it looks like it wants me to include the phantomjs.exe in my project in order to run, which may not work in a Azure Function...
Can I do what I wanted to do, or should I explore other options?
PhantomJS is a known unsupported framework in App Service, which is the same environment Azure Functions runs on.
You can find more information here: https://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox#unsupported-frameworks

scaffold-mobile-app scripts out command error wile Upgrading Azure mobile services to Mobile app services

I am just trying to upgrade my Azure Mobile Service(AMS) to Mobile app service with the help of documentation link provided here.
I have successfully migrated my Mobile service with the help of button provided on portal. After that I also installed node server on my local machine and installed following node package -
npm i -g azure-mobile-apps-compatibility
I have also obtained my Azure Mobile Service script files. Following is my folder hierarchy of Scripts folder -
Now here in this step I am stuck. I am trying to Scaffold the new Azure Mobile Apps backend with the help of following Node command -
scaffold-mobile-app scripts out
When I executed above command, I am getting following errors in node command prompt -
After looking at the errors I thought that there is some problem with my municipality api files. So I also tried removing my municipality.js and permissions.js file. After that I re executed the scaffolding command. But it again gave me the following error -
I did some research to resolve this error. But I did not get any relevant help in that context. Can someone help/ guide me so that I can proceed further in this upgrade activity?

Selenium and Azure Web App

I have an app using Selenium's ChromeDriver to click and retrieve a file from a website. I have decided to publish it as an Azure Job, would I still be able to run parts of the code that interface the ChromeDriver?
Also, I prefer not to use PhantomJS as sometimes it throws an error that the element is unclickable.
Many thanks in advance for your help.
Might not be possible on Azure App Service.
From https://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox#unsupported-frameworks
Unsupported Frameworks
[...]
PhantomJS/Selenium: tries to connect to local address, and also uses GDI+.
If you can convince Selenium to not bind to a socket on 127.0.0.1 and if you're not using stuff that hooks into GDI+ then it MAY work, it's a long shot though.
Try Cloud Services with a Worker Role instead or a VM (IaaS).
I deployed a few functional tests (Phantom) in a Webrole (Cloud Services) and everything went without a hitch. In my particular case i'm calling those tests from the build server over REST.

With Windows Azure, can I deploy a node.js server using Dropbox?

There are several tutorials on Azure showing how to deploy a node.js server using git. Azure has a nifty feature where you can link a Dropbox folder to an Azure web site for very simple deployments. Works awesome for websites, but I was hoping it might work for node.js deployments as well.
It doesn't seem to work- the deployment process goes fine, but navigating to the URL of the node.js deployment produces this error:
The page cannot be displayed because an internal server error has occurred.
Anyone know if it's possible to deploy a node.js server to Windows Azure via Dropbox?
Many thanks-
UPDATE-
Just ran through the deployment logs and found this line:
The package.json file is not present.
The node.js application will run with the default node.js version 0.6.20.
Perhaps that it explains my problem?
from the console and folder type "npm init" to generate package.json

Resources