thangdc / web-automation

Web Automation written in C#, using Web Browser control to automate many things. You can do many things by write JavaScript code to control a Web Browser.
http://www.thangdc.com
73 stars 44 forks source link

How is web automation work?

Web automation is a web browser which can help automation the browser like fill text, click on button, extract the data, save file from web automatically by javascript only.

IMAGE ALT TEXT HERE

Example

  1. Login to Gmail

    • Open gmail: go('gmail.com');
    • Wait 5 seconds: sleep(5, false);
    • Fill username: fill("Email", "test");
    • Wait 1 second: sleep(1, false);
    • Fill password: fill("Passwd", "test");
    • Wait 1 second: sleep(1, false);
    • Click button Sign In: click("signIn");
    • Waith 2 seconds: sleep(2, false);
    • Get error message: var text = extract("errormsg_0_Passwd", "text");
    • Show error: alert(text);
  2. Take website image

    //Take Snapshot

    • Location to save image: var location = getCurrentPath() + '\image.png';
    • Save to image: takesnapshot(location);

Which thirdparty was used in the Web Automation project?

  1. GeckoFx
    • Replace web browser control
    • Geckofx-Core.dll
    • Geckofx-Winforms.dll
    • xulrunner (folder)
  2. Scintilla.NET
    • Using for texteditor
    • SciLexer.dll
    • SciLexer64.dll
    • ScintillaNET.dll
  3. NPOI
    • Working with excel file (xls)
    • NPOI.dll
  4. MouseKeyboardLibrary
    • Record your mouse and keyboard
    • MouseKeyboardLibrary.dll

How to run Web Automation project?