File | Date | Author | Commit |
---|---|---|---|
minium-app | 2014-12-07 | Rui Figueira | [0aed10] [maven-release-plugin] prepare for next develop... |
minium-core | 2015-01-22 | Daniel Pinto | [3cdb9d] Fixed compilation error with Java 8 |
minium-prefs | 2014-12-07 | Rui Figueira | [0aed10] [maven-release-plugin] prepare for next develop... |
minium-script | 2014-12-07 | Rui Figueira | [0aed10] [maven-release-plugin] prepare for next develop... |
minium-speech | 2014-12-07 | Rui Figueira | [0aed10] [maven-release-plugin] prepare for next develop... |
src | 2013-12-10 | Rui Figueira | [19915b] Checkstyle configuration simplified for better ... |
.gitignore | 2013-12-07 | Rui Figueira | [c9d548] .gitignore updated |
.travis.yml | 2015-01-30 | Rui Figueira | [b040ed] excluding branch from travis |
AUTHORS | 2013-06-11 | Rui Figueira | [a2a7a4] Added Ricardo Santos to AUTHORS |
COPYING | 2013-05-31 | Rui Figueira | [7d9ebc] Minium getting ready for github |
README.md | 2014-11-02 | The Gitter Badger | [479f25] Added Gitter badge |
pom.xml | 2015-01-28 | Rui Figueira | [c3c5bb] Some plugins updated |
Minium is a framework, developed by Rui Figueira @ VILT, that combines jQuery and Selenium for browser testing
and tasks automation. It also provides an interactive console that easily lets you execute Minium instructions,
providing you immediate feedback.
In today's JavaScript development landscape, jQuery is the dominant auxiliar library. A major contributor for this
state of affairs is JQuery's powerful element selector engine. Now ubiquous in use, it provides a quick and
intelligible way to select precisely the elements we want. At the other end of the development spectrum, Selenium
is currently the most popular automation framework due to its innovative WebDriver API. Minium combines Selenium's
impressive automation capabilities with jQuery's selector engine to produce a simple way to create elaborate
automation tasks in the complex web interfaces of today.
You may be thinking: big deal, there are several other tools for browser automation... That's true, but:
// will look to ALL opened windows to find a text field with label "Username", and fill it with a value
usernameFld = $(wd).window().find(":text").withLabel("Username");
// will look to ALL frames in the main page to find a text field with label "Username"
usernameFld = $(wd).frame().find(":text").withLabel("Username");
You can watch all available Minium videos at
Youtube playlist.
The easiest way to try Minium is to use Minium App, which contains Minium Web Console (you can watch the video 'Minium shows its new Web Console' for a small introducion) and a bundled Jetty server.
This way, you can instruct Minium to do almost anything in a browser with a few lines of Javascript.
Ensure that the following software is installed:
JAVA_HOME
environment variable To install and run Minium App, just follow these instructions:
c:\Tools\minium-app
)drivers
folder:minium-app.exe
(in windows)bin\minium-app.bat
(also in windows, but this way you can see the stdout)bin\minium-app
(linux or mac)If Minium doesn't open a chrome app when you execute any of those scripts, probably you'll need to indicate where your chrome binary is in minium-prefs.json
(edit specify the full Chrome binary path in the chromeBin
property).
You're now able to create a web driver. Just go to Web Drivers
, pick your prefered browser and name it wd
. Then, just type the following code and run it by selecting it and pressing Ctrl+ENTER
:
get(wd, "http://www.google.com/ncr");
speak("Hello, I'm Minium, and I'm alive");
speak("Let me highlight google search box");
searchbox = $(wd, ":text").withName("q");
highlight(searchbox);
speak("Minium = Minion + Selenium. Let's find out what is a Minion.");
fill(searchbox, "minion");
sendKeys(searchbox, [ Keys.ENTER ]);
wikipediaResult = $(wd, "h3 a").withText("Minion - Wikipedia, the free encyclopedia");
click(wikipediaResult);
firstParagraph = $(wd, "#mw-content-text p").first();
highlight(firstParagraph);
speak("Wikipedia says: " + firstParagraph.text());
Or try this other script:
get(wd, "https://docs.google.com/spreadsheet/ccc?key=0Al0ulrJIDCUVdEhoSDlRbVZYWUt5ZVJCb1pVb0h1UFE");
var loading = $(wd, "#waffle-loading-screen").visible();
var sheetTabs = $(wd, ".docs-sheet-tab-name");
var numFrames = sheetTabs.size();
for (var time = 0; time < 4 * numFrames; time++) {
waitWhileNotEmpty(loading);
var sheetTab = sheetTabs.eq(time % numFrames);
click(sheetTab);
}
Building Minium is not complicated. Ensure that the following software is installed:
JAVA_HOME
environment variable Then, just clone Minium git repository and use Maven to build it:
git clone git://github.com/viltgroup/minium.git
cd minium
mvn install -DskipTests=true
Note: if you really want to run the tests, then make sure you have PhantomJS installed and available in the PATH
environment variable. Then just replace mvn install -DskipTests=true
by mvn install
.
You can then use the built Minium App found at minium-app/target/minium-app
.
A quick guide on how to use Minium in a Java project or using its Interactive console can be found here:
If you feel that's too simple, check this one:
You can also check the Minium API documentation. For a complete list of allowed methods, check the links below.
Minium is licensed under Apache 2.0.