Skip to content
thangdc edited this page Oct 27, 2016 · 1 revision

What is Web Automation?

Web automation can help to automate some repeated task on web such as: navigate to the website, click on the button, link, extract the data from the website, fill the value to the text box, dropdown, checkbox...

How Web Automation work?

How web automation work?


As you see in the picture, the web automation program has two part: web browser to display website, developer tool where you can write the javascript to control the web browser.

When you enter the script to the developer tool then you click Execute button, the script text was executed in the hidden web browser by InvokeScript and this second web browser we define all function we want to use.

Regarding the second hidden web browser we define the function and in the function will be callback to C# code by using window.external.(name of function in C#).

#How to use Web Automation?

I have created 2 ways for the user to use the Web Application, the first way for the developer who know the javascript and all the functions were used, the second way for the user who can use in the GUI.

Download the Web Automation: http://www.mediafire.com/file/pve90adavwx99h5/Web-Automation-1.0.6.zip

1. For Developer

  • Step 1: Open WebAutomation.exe
  • Step 2: Click on the Show Developer Tool from the Toolbar
  • Step 3: In the Developer Tool, enter some function and click Excecute to verify.

Example: I want to navigate to google, in the Developer tool I will enter: go('http://www.google.com'); and click Execute, the web browser will be displayed the google web site.

2. For normal user

  • Step 1: Open WebAutomation.exe
  • Step 2: Input some web site url in the textbox and click Go button, please wait until the website has been loaded.
  • Step 3: Right click on the web browser, you will see the context menu with all functions list.
  • Step 4: Choose one function you want to try, for example I want to navigate to google, I choose Go the the message box display ask you "Do you want to go the website?", select Yes then enter http://www.google.com, click OK
  • Step 5: The Developer Tool was opened and you will see the function go('http://www.google.com');, click Execute, the web browser will be displayed the google web site.

List functions were support by Web Automation

  1. stringtoXML(data), convert xml string to javascript object.
  2. tabnew(), it will open new tab
  3. tabclose(), it will close the current tab
  4. tabcloseall(), it will close all tabs
  5. go(url), it will navigate to the url parameter
  6. back(), it will call the web browser go back
  7. next(), it will call the web browser go next
  8. reload(), it will call the web browser to reload page
  9. stop(), it will stop the loading web browser
  10. sleep(time, isWaitWebBrowserLoaded), it will wait with the specific time, or if isWaitWebBrowserLoaded = true, it will run next function if the web browser has been loaded even the specific time still not come.
  11. exit(), it will close the program
  12. click(element), it will click on specific xpath element provided. ....

They have many functions, I will continue update it later.