tisto / robotframework-angularjs

An AngularJS extention to Robotframework's Selenium2Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AngularJSLibrary - robotframework-angularjs

An AngularJS extension to Robotframework's Selenium2Library

What is included

AngularJSLibrary provides keywords for finding elements by binding, model, and repeater. The library also provides a keyword for waiting on angular.

Installation

To install AngularJSLibrary, run:

Alternatively, to install from source:

Keyword Usage

In order to use the keywords you have to include AngularJSLibrary in the settings section of your test.

*** Settings ***
Library         AngularJSLibrary
...

*** Test Cases ***
Go To  localhost:8080
Wait for Angular
...

The new locator strategies include

For example, you can look for an Angular ng-binding using

or by using partial match

or by simply using the binding {{…}} notation

One can also find elements by model

Finally there is the strategy of find by repeat. This takes the general form of :rf:`repeater=some ngRepeat directive@row[n]@column={{ngBinding}}`. Here we specify the directive as well as the row, an zero-based index, and the column, an ngBinding. Using this full format will return, if exists the element matching the directive, row and column binding. One does not need to specify the row and column but can specify either both, one or the other or neither. In such cases the locator may return list of elements or even a list of list of elements. Also the ordering of row and column does not matter; using :rf:`repeater=baz in days@row[0]@column=b` is the same as :rf:`repeater=baz in days@column=b @row[0]`.

Getting Help

If you need help with AngularJSLibrary, Selenium2Library, or Robot Framework usage, please post to the user group for Robot Framework.

References

About

An AngularJS extention to Robotframework's Selenium2Library

License:Apache License 2.0


Languages

Language:Python 50.4%Language:JavaScript 49.6%