Browser Automation Utility
This repository contains the source code of a browser automation utlility, which supports in-browser automation with asynchronous chaining feature.
Overview of Folder Structure
srccontains the pre-build files of the UI Recorder.
testcontains the files for testing the UI recorder.
gulpcontains the gulp task files.
Anatomy of the Utility
Here is the overview for the files under
browser.jsis it is the entry point for gulp to build browser.js, and it's the core component.
async-chain.jssupports the chaining of browser's method call.
wait.jssupports waiting for condition to be met.
Set up The Local Environment
Here are the steps:
gulpglobally if you haven't done so.
gulpto build the
browser.js is built with Browserify's standalone option. You can use it with CommonJS, require.js, or include the file directly.
Here is a sample that use
var browser = windowbrowser;browser; // browser is a singleton, and it needs to be initialized.browser// The operation is added to the chain, but not executed.; // Use css selector.browser; // Execute all operations in the chain;