0

I have a Delphi application that uses a browser wrapper (TWebbrowser or TChromium) to do automated tasks in websites : data scrapping, login, click on interface and so on.

Because i use Delphi, my app is limited to Windows. I'd like to port the same app to a modern language and move it to the cloud, so people can use it in any device's browser.

The problem is my app does a lot of tasks that could not be done by a simple CURL or HTTP GET, at least as far as i know (my web development capabilities are limited).

Is there any web platform that could do this job ? Can i use pure javascript to interact with a page in another URL, like the example below :

1 - Navigate to a URL, wait the page load.
2 - Login on the page
3 - Navigate to a specific url of this page.
4 - Fill some inputs on the page's form
5 - Click on a button to upload a file
6 - Post the form

As this examples describes, is not just a simple CURL or GET.

Thanks in advance.

delphirules
  • 6,443
  • 17
  • 59
  • 108
  • 1
    Sorry to say, but your question seems to be off topic and has already started to collect close votes, ref: *Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.* Having said that, there is nothing in your list, that any browser with some client side scripting could not do. – Tom Brunberg May 22 '17 at 22:20
  • 1
    This question is off-topic, but at least you put some effort into it... Thanks for that. If you want browser automation in JavaScript, you have lots of frameworks and libraries available. The tools I like most are CasperJS with PhantomJS and Nightwatch.js with Selenium. You can also take a look at Nightmare.js, WebdriverIO, Zombie.js, ... – Badacadabra May 22 '17 at 22:39
  • Sorry but i really needed some ideas to this issue, even it's not code related. Thanks for answering. – delphirules May 23 '17 at 12:47

1 Answers1

0

Ok, what you can do is to use phantomJS instead of TWebbrowser / TChromium. it's has the same capabilities to run javascript and you can automate it from delphi, or fully run it via a js script

zeus
  • 12,173
  • 9
  • 63
  • 184
  • Thank you, will check phantomJS ! – delphirules May 23 '17 at 12:49
  • As far as i could understand, i can't run this inside a browser, is it correct ? PhantomJS is a stand-alone framework, so i will still be restricted to the platform it is installed ? – delphirules May 24 '17 at 12:53
  • No problem about the GUI ; but what i'm seeking is a way to run the automation on the client-side, just like my Delphi app does. Is it possible with PhantonJS ? – delphirules May 24 '17 at 17:30