2

A client has scheduled jobs that use the Selenium webdriver running on a desktop machine that, at scheduled intervals, screen scrape a number of websites (requiring login information) for data which is then packaged into reports.

I know that it is in principle possible to replicate this behavior using GET/POST requests, though if cookies are being used in the background I do not think that Salesforce's HTTPRequest can handle that.

Is there a Selenium like webdriver which can be used natively in APEX, or a similar way to accomplish the same goal? Or should I be resigned to figuring out and mimicking the HTTP requests being made for each step of login and navigation for the pages to be scraped?

  • I'm not sure whether something like this exists, but I would be surprised if it did. There's just too much potential for abuse, as long as it's possible to sign up for an unlimited number of free Developer Edition accounts in a few seconds with nothing more than a valid email address. – Sequoyah Mar 14 '17 at 0:36
  • I strongly suspect you are right, though I believe the potential for abuse of developer editions still exists. – LucidLunatic Mar 15 '17 at 3:01
1

There is a project called Cinnamon:

Force.com Cinnamon App

Cinnamon is a Force.com app that enables you to build and run Selenium tests to validate your custom UI pages with Visualforce or Javascript in your Salesforce organization.

With Cinnamon, you can

Create and execute Selenium Tests from within your Salesforce organization.
Get out-of-box integration with Sauce Labs, which provides comprehensive OS and browser coverage.
Connect to any of your Salesforce Developer Edition or sandbox organization via OAuth authentication.
Easily create PageObject classes to interact with your UI pages for your tests

But it was last updated in 2014. There is another tool called Provar which supports Lightning:

Comparison of Selenium and Provar

References

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.