Pooja Parikh
Graphix Design Solutions (Manager)
E<EMAIL_ADDRESS>M: +61410079338
...
Thomas Schmidt
Woolworth Supermarket (Grocery Manager)
M: +61488386738
DATA ANALYST
Dedicated Data Analyst with hands on experience of handling data, solving problem of complex data migration and structures, identifying problem related to data streams, and managing projects. Comfortable at receiving and monitoring data from multiple data streams, collectively with MySQL, T-SQL, SSIS, .NET Framework and Python Django. Have finished many team and individual projects on the mentioned framework. Well acquainted with Database Concepts, Distributed Development, Data-base Driven Website, Statistics and Interactive Software.
2018 - 2019 Data Analyst at Graphix Design Solutions, Coombs, ACT, Australia.
2019 - 2020 Department Supervisor at Woolworths Supermarket, Darwin, Australia.
2017 - 2020 Bachelors of Information Technology, Charles Darwin University, Darwin, Australia.
September 2018 Cyber Security Challenge, Darwin, Australia.
October 2018 Open CDU, Darwin, Australia.


@(
topic: Topic,
mapping: scala.collection.mutable.Buffer[TopicWordsMapping],
probabilities: scala.collection.mutable.Buffer[String],
coverage: String,
emails: scala.collection.mutable.Buffer[Email],
emailsMapping: scala.collection.mutable.Buffer[EmailTopicsMapping],
emailProbabilities: scala.collection.mutable.Buffer[String],
startFrom: Int,
pageSize: Int
)
Topic: @topic.name
Topic: @topic.name
Emails for topic:
| № |
Email |
Probability |
@for(m <- ((emailProbabilities zip emails) zip (Stream from startFrom)) take pageSize) {
| @m._2 |
@m._1._2.name |
@m._1._1 |
}
Topic distribution: coverage(by 20) is @coverage
| № |
Word |
Probability |
@for(m <- ((mapping zip probabilities) zip (Stream from 1)) take 100) {
@if(m._1._1.probability >= 0.01) {
} else {
}
| @m._2 |
@m._1._1.word |
@m._1._2 |
}


Here are a few things you might be interested in.
Resume
Wanna hire me, but need all the pertinent information first? Look no further! This is your one-stop for all things Max.
Reading
A collection of some of my favorites books related to Technology, Design, and Organization.
Styleguide
A style guide and code standards document is a way of ensuring brand and code consistency.


VPP with VMware/Vmxnet3¶
This section describes a native Vmxnet3 driver that is included with VPP. This driver is written as a plugin and is found in src/plugin/vmxnet3.
Advantages¶
The native VPP native vmxnet3 driver provides the following features that are not provided with the standard dpdk vmxnet3 driver.
Interrupt mode
Adaptive mode
LRO/TSO mode
Prerequisites¶
This code is tested with vfio-pci driver installed with Ubuntu 18.04 which has kernel version 4.15.0-33-generic.
This code is tested with ESXi vSwitch version 6.5 and 6.7 for LRO/TSO support, VMware Workstation 15 Pro (no LRO/TSO), and VMware Fusion 11 Pro (no LRO/TSO).
Driver requires MSI-X interrupt support, which is not supported by uio_pci_generic driver, so vfio-pci needs to be used. On systems without IOMMU vfio driver can still be used with recent kernels which support no-iommu mode.
VMware Fusion for Mac¶
VMware fusion does not have a menu option to change the default driver (e1000) to the vmxnet3 driver. VPP supports the vmxnet3 driver.
These instructions describe how to change the e1000 driver for VMware fusion.
From the VMware Fusion menu bar select Window then Virtual Machine Library.
From the Virtual Machine menu right click on the Virtual Machine you are using and select Show in Finder
Find the name associated with the VM you are using, right click on it and select Show Package Contents
Find the .vmx file and edit it.
Find all the occurrences of e1000 and change them to vmxnet3
If you are concerned more with configuration not performance the vmxnet3 driver can be set to interrupt mode in VPP. This will save a great deal on battery usage. Do this with the following
VMware Workstation PRO 15 for Linux¶
VMware Workstation does not have a menu option to change the default driver (e1000) to the vmxnet3 driver. VPP supports the vmxnet3 driver.
These instructions describe how to change the e1000 driver for VMware Workstation PRO 15 Linux. You may need to be a superuser for performing these steps.

From the vmware folder where vmware creates and stores the VM’s, change the directory to the specific VM which you want to modify, and use your favorite text editor to open the corresponding VM’s .vmx file. By default, it is $HOME/vmware/<vm-name>/<vm-name>.vmx
Locate the line for the interface which you want to modify. For example, if it is ethernet1, then change the line ethernet1.virtualDev = “e1000” to ethernet1.virtualDev = “vmxnet3”
Save the file and power on the VM.
If you are concerned more with configuration not performance the vmxnet3 driver can be set to interrupt mode in VPP. This will save a great deal on battery usage. Do this with the following
$ sudo vppctl set interface rx-mode <interface> interrupt
System setup¶
To use the native VPP vmxnet3 driver use the following Steps
Load VFIO driver
$ sudo modprobe vfio-pci
Make sure the interface is down
$ sudo ifconfig <if-name> down
The next 2 steps are optional and may be accomplished by specifying the optional “bind” keyword when creating the vmxnet3 interface.
For systems without IOMMU only, enable unsafe NOIOMMU mode
$ echo Y | sudo tee /sys/module/vfio/parameters/enable_unsafe_noiommu_mode
To bind interface to vfio-pci first install get the dpdk_devbind.py script.
Bind the driver with the following commands:
$ sudo /usr/local/vpp/vpp-config/scripts/dpdk-devbind.py -s
Network devices using DPDK-compatible driver
============================================
<none>
Network devices using kernel driver
===================================
0000:03:00.0 'VMXNET3 Ethernet Controller' if=ens160 drv=vmxnet3 unused=vfio-pci,uio_pci_generic
0000:0b:00.0 'VMXNET3 Ethernet Controller' drv=vfio-pci unused=vmxnet3,uio_pci_generic
0000:13:00.0 'VMXNET3 Ethernet Controller' drv=vfio-pci unused=vmxnet3,uio_pci_generic
.....
$ sudo /usr/local/vpp/vpp-config/scripts/dpdk-devbind.py --bind vfio-pci 0b:00.0
Interface Creation¶
Now create the interface dynamically with following. The bind option must be specified if pci is not already bound manually by above steps.
$ sudo vppctl create interface vmxnet3 0000:0b:00.0 bind
$ sudo vppctl set interface state vmxnet3-0/b/0/0 up
Interface Deletion¶
If the interface needs to be deleted:
$ sudo vppctl delete interface vmxnet3 <if-name>
Show vmxnet3¶
Interface and ring information can be obtained with the command show vmxnet3 [if-name] [desc]
For example:
$ sudo vppctl show vmxnet3
Interface: vmxnet3-0/b/0/0 (ifindex 1)
Version: 1
PCI Address: 0000:0b:00.0
Mac Address: 00:50:56:88:63:be
hw if index: 1
Device instance: 0
Number of interrupts: 2
Queue 0 (RX)
RX completion next index 786
RX completion generation flag 0x80000000
ring 0 size 4096 fill 4094 consume 785 produce 784
ring 1 size 4096 fill 4096 consume 0 produce 0
Queue 0 (TX)
TX completion next index 216
TX completion generation flag 0x0
size 4096 consume 216 produce 245


---
layout: page
title: FreeRADIUS 'man' pages
subtitle: Documentation from the server
subpage: true
navorder: 200
hero: documentation
subnav:
- text: Programs
link: '/radiusd/man/#programs'
- text: Configuration Files
link: '/radiusd/man/#files'
- text: Modules
link: '/radiusd/man/#modules'
---
rlm_realm
Section: FreeRADIUS Module (5)
Updated: 14 March 2004
Index
Return to Main Contents
NAME
rlm_realm - FreeRADIUS Module
DESCRIPTION
The
rlm_realm module parses the User-Name attribute into a
User section and a Realm section. This is used primarily in a
proxy situation, however, Realms can also be used locally to provide
different service profiles based on the Realm being used.
The main configuration items to be aware of are:
- format
-
This can be either 'prefix' or 'suffix'. It specifies whether the
Realm is before or after the User portion in the User-Name string.
- delimiter
-
A single character in quotes, which is used as the delimiting
character that separates the Realm and User sections of the string.
- ignore_default
-
This is set to either 'yes' or 'no'. If set to 'yes', this will
prevent the module instance from matching a realm against the DEFAULT
entry. This may be useful if you have multiple realm module instances.
The default is 'no'.
- ignore_null
-
This is set to either 'yes' or 'no'. If set to 'yes', this will
prevent the module instance from matching a realm against the NULL
entry. This may be useful if you have multiple realm module instances.
The default is 'no'.
This module parses the realm from the User-Name attrbiute according
to the instance configuration, and then performs a lookup to find a
matching realm in the '/etc/raddb/proxy.conf' file. Depending on the
configuration of the Realm as matched in the file, the username may
be rewritten in a 'stripped' format, or with the Realm portion
removed. In either case, a Realm attribute is created and added to
the packet on a match, which can be used by other modules.
CONFIGURATION
-
modules {
... stuff here ...
# useranme@realm syntax
realm suffix {
format = suffix
delimiter = "@"
}
# realm/username syntax
realm prefix {
format = prefix
delimiter = "/"
}
... stuff here ...
}
SECTIONS
authorization,
pre-accounting
FILES
/etc/raddb/radiusd.conf,
/etc/raddb/proxy.conf
SEE ALSO
radiusd(8),
radiusd.conf(5),
proxy.conf(5)
AUTHORS
Chris Parker,
<EMAIL_ADDRESS>Index
- NAME
-
- DESCRIPTION
-
- CONFIGURATION
-
- SECTIONS
-
- FILES
-
- SEE ALSO
-
- AUTHORS
-
This document was created by
man2html,
using the manual pages.
Time: 16:13:00 GMT, January 12, 2018


View Students
News
More
About
Add Events
Contact
Report an issue
Student details
Student
Registration number
Format: CB.EN.U4CSEXXXXX
Year of study
Select month and year
Department
Select one department
Computer Science & Engineering
Electrical & Electronics Engineering
Electronics & Communication Engineering
Mechanical Engineering
Chemical Engineering
Aerospace Engineering
Available for upcoming events?
Yes
No
Number of Skills
Add skills
About myself


| Leaderboard | Points |
|---|---|
| Waylon Jennings | 75 |
| Johnny Cash | 54 |
| Members | Points |
|---|---|
| Waylon Jennings | 75 |
| Johnny Cash | 54 |
| Kris Kristofferson | 40 |
| Willie Nelson | 32 |
| Leaderboard | Points |
|---|---|
| Sergei Rachmaninoff | 75 |
| Claude Debussy | 54 |
| Members | Points |
|---|---|
| Sergei Rachmaninoff | 75 |
| Claude Debussy | 54 |
| Anton Dvorak | 40 |
| Peter Tchaikovsky | 32 |
| Dmitri Shostakovish | 89 |
| Aram Khachaturian | 34 |


Biz EOD: GDP growth slows down to 4.5%; RBI may cut repo rate; Fiscal deficit of 3.9% realistic, says Uday Kotak
by BusinessToday.InCatch the top stories from the world of business and economy with BusinessToday.In's end of day (EOD) report
India's GDP growth rate slowed down to 4.5 per cent in the July-September quarter of this fiscal, as per NSO data released on Friday. Given the fragile condition of the Indian economy, RBI may announce another rate cut in its monetary policy announcement scheduled next week. Uday Kotak, VC and CEO of Kotak Mahindra Bank is comfortable with some deviation in the targeted fiscal deficit from 3.3% of the GDP to 3.5% or 3.9% in the fiscal year 2019-20. Read for more top stories from the world of business and economy:
1. GDP growth slows down to 4.5% in Q2, hits more than 6-year low
India's Q2 GDP Growth 2019: DEA Secretary Atanu Chakraborty and CEA KV Subramnaian said that the fundamentals of India economy remain strong and the GDP growth rate is expected to bounce back in the third quarter of this fiscal.
2. RBI may go for another rate cut as GDP slows to more than 6-year low
Analysts expect the MPC slashing interest rates by 25 basis points (bps), along with a marginal cut in gross domestic product (GDP) growth forecast for FY20.
3. No, Indian economy is still not in recession, but these countries are
Q2 GDP: Some of the key economies in the world are in the verge of recession raising fears about the global economic health.
4. RBI files insolvency application against debt-laden DHFL
DHFL is one of the biggest defaulters in the country that owes over Rs 1 lakh crore (over $14 billion) to its debtors.
5. Q2 GDP: Fiscal deficit of 3.9% realistic, says Uday Kotak
The just released GDP data for the second quarter (July-September) shows that the growth has gone down to 4.5 per cent (the lowest in six years) from 5 per cent in the first quarter (April-June).


expressions
modules
services
collections
profile
binding
naught
student data
Finding Circle
Binding without controller
Custom Services
Asynch Services
Single Page Application
student data seperate service layer
numbers seperate service layer


Throttle: 0
Pump Speed: 0
Throttle:q,e - Steering: a,d - Turntable: z,c - Drive: w,s - Move camera: mouseover the camfeed - Pneumatic arm joint 1: u,j - Pneumatic arm joint 2: i,k - Pneumatic arm hand: o,p -


Get two full days of sessions for one low price!
For groups of 5 or more
Full day hands-on pre-conference workshops (Monday, Nov 11th). Located in Waltham, MA - lunch and shuttle from/to Seaport Hotel included!
Join Vue Vixens CEO Jen Looper as we build a fun mobile-powered IoT app using Particle Photon devices. Each participant will be gifted a wifi-connected Photon device from our friends at Particle.


{%extends "IndAbout.html" %} {%block name%} Roy Telles {%endblock%} {%block image%} {%endblock%} {%block title%}
A senior at San Francisco State University, currently pursuing a Bachelor's degree in Computer Science, with a Mathematics minor. On my down time, I look for opportunities to educate myself in other programming languages outside of those offered by the curriculum. Current language of preference is Python.
{%endblock%} {% block contact %}Email<EMAIL_ADDRESS>GitHub: rtelles64
{%endblock%}


---
layout: post
title: Dancing feet Storyboards frames 50 60
date: '2017-07-03T10:30:34+02:00'
categories:
- Storyboards
- Sketches
picture_url: https://film-Storyboards.tumblr.com/post/162552829985/dancing-feet-Storyboards-frames-50-60
---
Dancing Feet Storyboards — frames 50 to 60.
Concept: Daniel Cloud Campos
Production: QUAD


Commit ID: c70c4d9c26d22c1308c7670339a32713e84b6742
Package: eu/stamp_project/examples/dhell
Tested: 7
Partially-tested: 3
Not-covered: 4


{% extends "global.html" %} {% from "_formhelpers.html" import render_field %} {% block content %}
You have not yet created any leagues.
Create a league now
{{ league.description }}
Rating Scheme: {{ league.rating_scheme }}


Its changes the Title, Video, Sidebar and Pauses the video of the YT when watching a video, created because if someone walks on you so you can quickly change everything and be safe :)
1. Press "Enter Key" to go in secure mode when someone walks on you.
2. Press "Enter Key" again to go back to the same video you were watching again.


Justin Bieber Wants To Trademark The Phrase ‘R&Bieber’
by Becca LongmireJustin Bieber is reportedly looking to trademark the phrase “R&Bieber”.
According to TMZ, Bieber’s team filed legal documents not long after the Canadian hitmaker posted the phrase on Instagram on October 27.
He also told fans he’d be releasing an album before Christmas if another post he shared reached 20 million likes.
TMZ claims Bieber wants to trademark “R&Bieber” for “entertainment services in the nature of live musical performances and production of sound recordings,” fuelling rumours this could be the name of an upcoming album.
The star is also said to want to use the phrase for merch and film.
ET Canada has contacted Bieber’s rep for comment.


$100 Million
by BRIEFWILMINGTON, Del. — The litigation trustee of the PNI Litigation trust, successor to Patriot National Inc., sued PNI’s former CEO Steven M. Mariano and 19 other officers for $100 million, claiming they destroyed PNI in bad faith, “almost entirely for the benefit of Mariano and his cronies,” in Delaware Chancery Court.
Copyright © 2019 courthousenews.com


Protractor API 1.1.0
Back to Top
protractor
locators
webdriver
Use as: element.all(locator)
ElementArrayFinder is used for operations on an array of elements (as opposed
to a single element).
Example

First

Second

Third

element.all(by.css('.items li')).then(function(items) {
expect(items.length).toBe(3);
expect(items[0].getText()).toBe('First');
});
Params
| Param |
Type |
Description |
| locator |
webdriver.Locator |
An element locator. |
| opt_parentElementFinder |
ElementFinder= |
The element finder previous to this. (i.e. opt_parentElementFinder.all(locator) => this) |
Returns
Returns
| Type |
Description |
| webdriver.Locator |
|
Use as: element.all(locator).getWebElements()
Returns the array of WebElements represented by this ElementArrayFinder.
Returns
| Type |
Description |
| Array.<webdriver.WebElement> |
|
Use as: element.all(locator).get(index)
Get an element found by the locator by index. The index starts at 0.
This does not actually retrieve the underlying element.
Example

First

Second

Third

var list = element.all(by.css('.items li'));
expect(list.get(0).getText()).toBe('First');
expect(list.get(1).getText()).toBe('Second');
Params
| Param |
Type |
Description |
| index |
number |
Element index. |
Returns
| Type |
Description |
| ElementFinder |
finder representing element at the given index. |
Use as: element.all(locator).first()
Get the first matching element for the locator. This does not actually
retrieve the underlying element.
Example

First

Second

Third

var first = element.all(by.css('.items li')).first();
expect(first.getText()).toBe('First');
Returns
| Type |
Description |
| ElementFinder |
finder representing the first matching element |
Use as: element.all(locator).last()
Get the last matching element for the locator. This does not actually
retrieve the underlying element.
Example

First

Second

Third

var last = element.all(by.css('.items li')).last();
expect(last.getText()).toBe('Third');
Returns
| Type |
Description |
| ElementFinder |
finder representing the last matching element |
Use as: element.all(locator).count()
Count the number of elements found by the locator.
Example

First

Second

Third

var list = element.all(by.css('.items li'));
expect(list.count()).toBe(3);
Returns
| Type |
Description |
| !webdriver.promise.Promise |
A promise which resolves to the number of elements matching the locator. |
Use as: element.all(locator).each(eachFunction)
Calls the input function on each ElementFinder found by the locator.
Example

First

Second

Third

element.all(by.css('.items li')).each(function(element) {
// Will print First, Second, Third.
element.getText().then(console.log);
});
Params
Use as: element.all(locator).map(mapFunction)
Apply a map function to each element found using the locator. The
callback receives the ElementFinder as the first argument and the index as
a second arg.
Example

First

Second

Third

var items = element.all(by.css('.items li')).map(function(elm, index) {
return {
index: index,
text: elm.getText(),
class: elm.getAttribute('class')
};
});
expect(items).toEqual([
{index: 0, text: 'First', class: 'one'},
{index: 1, text: 'Second', class: 'two'},
{index: 2, text: 'Third', class: 'three'}
]);
Params
| Param |
Type |
Description |
| mapFn |
function(ElementFinder, number) |
Map function that will be applied to each element. |
Returns
| Type |
Description |
| !webdriver.promise.Promise |
A promise that resolves to an array of values returned by the map function. |
Use as: element.all(locator).filter(filterFn)
Apply a filter function to each element found using the locator. Returns
promise of a new array with all elements that pass the filter function. The
filter function receives the ElementFinder as the first argument
and the index as a second arg.
Example

First

Second

Third

element.all(by.css('.items li')).filter(function(elem, index) {
return elem.getText().then(function(text) {
return text === 'Third';
});
}).then(function(filteredElements) {
filteredElements[0].click();
});
Params
| Param |
Type |
Description |
| filterFn |
function(ElementFinder, number): webdriver.WebElement.Promise |
Filter function that will test if an element should be returned. filterFn should return a promise that resolves to a boolean. |
Returns
| Type |
Description |
| !webdriver.promise.Promise |
A promise that resolves to an array of ElementFinders that satisfy the filter function. |
Use as: element.all(locator).reduce(reduceFn)
Apply a reduce function against an accumulator and every element found
using the locator (from left-to-right). The reduce function has to reduce
every element into a single value (the accumulator). Returns promise of
the accumulator. The reduce function receives the accumulator, current
ElementFinder, the index, and the entire array of ElementFinders,
respectively.
Example

First

Second

Third

var value = element.all(by.css('.items li')).reduce(function(acc, elem) {
return elem.getText().then(function(text) {
return acc + text + ' ';
});
});
expect(value).toEqual('First Second Third ');
Params
| Param |
Type |
Description |
| reduceFn |
function(number, ElementFinder, number, Array.<ElementFinder>) |
Reduce function that reduces every element into a single value. |
| initialValue |
* |
Initial value of the accumulator. |
Returns
| Type |
Description |
| !webdriver.promise.Promise |
A promise that resolves to the final value of the accumulator. |
Use as: element(locator)
The ElementFinder can be treated as a WebElement for most purposes, in
particular, you may perform actions (i.e. click, getText) on them as you
would a WebElement. ElementFinders extend Promise, and once an action
is performed on an ElementFinder, the latest result from the chain can be
accessed using then. Unlike a WebElement, an ElementFinder will wait for
angular to settle before performing finds or actions.
ElementFinder can be used to build a chain of locators that is used to find
an element. An ElementFinder does not actually attempt to find the element
until an action is called, which means they can be set up in helper files
before the page is available.
Example
{{person.name}}

<input type="text" ng-model="person.name"/>
// Find element with {{scopeVar}} syntax.
element(by.binding('person.name')).getText().then(function(name) {
expect(name).toBe('Foo');
});
// Find element with ng-bind="scopeVar" syntax.
expect(element(by.binding('person.email')).getText()).toBe('foo@bar.com');
// Find by model.
var input = element(by.model('person.name'));
input.sendKeys('123');
expect(input.getAttribute('value')).toBe('Foo123');
Params
| Param |
Type |
Description |
| locator |
webdriver.Locator |
An element locator. |
| opt_parentElementFinder |
ElementFinder= |
The element finder previous to this. (i.e. opt_parentElementFinder.element(locator) => this) |
| opt_actionResult |
webdriver.promise.Promise |
The promise which will be retrieved with then. Resolves to the latest action result, or null if no action has been called. |
| opt_index |
number= |
The index of the element to retrieve. null means retrieve the only element, while -1 means retrieve the last element |
Returns
Use as: element(locator).element(locator)
Calls to element may be chained to find elements within a parent.
Example

Child text

{{person.phone}}

// Chain 2 element calls.
var child = element(by.css('.parent')).
element(by.css('.child'));
expect(child.getText()).toBe('Child text\n555-123-4567');
// Chain 3 element calls.
var triple = element(by.css('.parent')).
element(by.css('.child')).
element(by.binding('person.phone'));
expect(triple.getText()).toBe('555-123-4567');
Params
| Param |
Type |
Description |
| subLocator |
webdriver.Locator |
|
Returns
Use as: element(locator).all(locator)
Calls to element may be chained to find an array of elements within a parent.
Example

First

Second

Third

var items = element(by.css('.parent')).all(by.tagName('li'))
Params
| Param |
Type |
Description |
| subLocator |
webdriver.Locator |
|
Returns
Use as: $(cssSelector)
Shortcut for querying the document directly with css.
Example

First
Second

var item = $('.count .two');
expect(item.getText()).toBe('Second');
Params
| Param |
Type |
Description |
| selector |
string |
A css selector |
Returns
Use as: $$(cssSelector)
Shortcut for querying the document directly with css.
Example

First
Second

// The following protractor expressions are equivalent.
var list = element.all(by.css('.count span'));
expect(list.count()).toBe(2);
list = $$('.count span');
expect(list.count()).toBe(2);
expect(list.get(0).getText()).toBe('First');
expect(list.get(1).getText()).toBe('Second');
Params
| Param |
Type |
Description |
| selector |
string |
a css selector |
Returns
Use as: element(locator).isPresent()
Determine whether the element is present on the page.
Example
{{person.name}}
// Element exists.
expect(element(by.binding('person.name')).isPresent()).toBe(true);
// Element not present.
expect(element(by.binding('notPresent')).isPresent()).toBe(false);
Returns
| Type |
Description |
| ElementFinder |
which resolves to whether the element is present on the page. |
Override for WebElement.prototype.isElementPresent so that protractor waits
for Angular to settle before making the check.
Returns
| Type |
Description |
| ElementFinder |
which resolves to whether the element is present on the page. |
Returns
| Type |
Description |
| webdriver.Locator |
|
Use as: element(locator).getWebElement()
Returns the WebElement represented by this ElementFinder.
Throws the WebDriver error if the element doesn't exist.
If index is null, it makes sure that there is only one underlying
WebElement described by the chain of locators and issues a warning
otherwise. If index is not null, it retrieves the WebElement specified by
the index.
Example
The following three expressions are equivalent.
- element(by.css('.parent')).getWebElement();
- browser.waitForAngular(); browser.driver.findElement(by.css('.parent'));
- browser.findElement(by.css('.parent'))
Returns
Evaluates the input as if it were on the scope of the current element.
Params
| Param |
Type |
Description |
| expression |
string |
|
Returns
| Type |
Description |
| ElementFinder |
which resolves to the evaluated expression. The result will be resolved as in {@link webdriver.WebDriver.executeScript}. In summary - primitives will be resolved as is, functions will be converted to string, and elements will be returned as a WebElement. |
Determine if animation is allowed on the current element.
Params
| Param |
Type |
Description |
| value |
string |
|
Returns
| Type |
Description |
| ElementFinder |
which resolves to whether animation is allowed. |
Access the underlying actionResult of ElementFinder. Implementation allows
ElementFinder to be used as a webdriver.promise.Promise
Params
| Param |
Type |
Description |
| fn |
function(webdriver.promise.Promise) |
Function which takes the value of the underlying actionResult. |
Returns
| Type |
Description |
| webdriver.promise.Promise |
Promise which contains the results of evaluating fn. |
Webdriver rely on this function to be present on Promises, so adding
this dummy function as we inherited from webdriver.promise.Promise, but
this function is irrelevant to our usage
Returns
| Type |
Description |
| boolean |
Always false as ElementFinder is never in pending state. |
Params
| Param |
Type |
Description |
| webdriver |
webdriver.WebDriver |
|
| opt_baseUrl |
string= |
A base URL to run get requests against. |
| opt_rootElement |
string= |
Selector element that has an ng-app in scope. |
The reset URL to use between page loads.
Instruct webdriver to wait until Angular has finished rendering and has
no outstanding $http calls before continuing.
Returns
| Type |
Description |
| !webdriver.promise.Promise |
A promise that will resolve to the scripts return value. |
Waits for Angular to finish rendering before searching for elements.
Returns
Waits for Angular to finish rendering before searching for elements.
Returns
| Type |
Description |
| !webdriver.promise.Promise |
A promise that will be resolved to an array of the located webdriver.WebElements. |
Tests if an element is present on the page.
Returns
| Type |
Description |
| !webdriver.promise.Promise |
A promise that will resolve to whether the element is present on the page. |
Add a module to load before Angular whenever Protractor.get is called.
Modules will be registered after existing modules already on the page,
so any module registered here will override preexisting modules with the same
name.
Params
| Param |
Type |
Description |
| name |
!string |
The name of the module to load or override. |
| script |
!string|Function |
The JavaScript to load the module. |
| varArgs |
...* |
Any additional arguments will be provided to the script and may be referenced using the arguments object. |
Clear the list of registered mock modules.
Remove a registered mock module.
Params
| Param |
Type |
Description |
| name |
!string |
The name of the module to remove. |
See webdriver.WebDriver.get
Navigate to the given destination and loads mock modules before
Angular. Assumes that the page being loaded uses Angular.
If you need to access a page which does not have Angular on load, use
the wrapped webdriver directly.
Params
| Param |
Type |
Description |
| destination |
string |
Destination URL. |
| opt_timeout |
number= |
Number of milliseconds to wait for Angular to start. |
See webdriver.WebDriver.refresh
Makes a full reload of the current page and loads mock modules before
Angular. Assumes that the page being loaded uses Angular.
If you need to access a page which does not have Angular on load, use
the wrapped webdriver directly.
Params
| Param |
Type |
Description |
| opt_timeout |
number= |
Number of seconds to wait for Angular to start. |
Mixin navigation methods back into the navigation object so that
they are invoked as before, i.e. driver.navigate().refresh()
Browse to another page using in-page navigation.
Params
| Param |
Type |
Description |
| url |
string |
In page URL using the same syntax as $location.url() |
Returns
| Type |
Description |
| !webdriver.promise.Promise |
A promise that will resolve once page has been changed. |
Returns the current absolute url from AngularJS.
Pauses the test and injects some helper functions into the browser, so that
debugging may be done in the browser console.
This should be used under node in debug mode, i.e. with
protractor debug
While in the debugger, commands can be scheduled through webdriver by
entering the repl:
debug> repl
Press Ctrl + C to leave rdebug repl
ptor.findElement(protractor.By.input('user').sendKeys('Laura'));
ptor.debugger();
debug> c
This will run the sendKeys command as the next task, then re-enter the
debugger.
Beta (unstable) pause function for debugging webdriver tests. Use
browser.pause() in your test to enter the protractor debugger from that
point in the control flow.
Does not require changes to the command line (no need to add 'debug').
The Protractor Locators. These provide ways of finding elements in
Angular applications by binding, model, etc.
webdriver's By is an enum of locator functions, so we must set it to
a prototype before inheriting from it.
Use as: by.addLocator(locatorName, functionOrScript)
Add a locator to this instance of ProtractorBy. This locator can then be
used with element(by.locatorName(args)).
Example
<button ng-click="doAddition()">Go!</button>
// Add the custom locator.
by.addLocator('buttonTextSimple', function(buttonText, opt_parentElement) {
// This function will be serialized as a string and will execute in the
// browser. The first argument is the text for the button. The second
// argument is the parent element, if any.
var using = opt_parentElement || document,
buttons = using.querySelectorAll('button');
// Return an array of buttons with the text.
return Array.prototype.filter.call(buttons, function(button) {
return button.textContent === buttonText;
});
});
// Use the custom locator.
element(by.buttonTextSimple('Go!')).click();
Params
| Param |
Type |
Description |
| name |
string |
The name of the new locator. |
| script |
Function|string |
A script to be run in the context of the browser. This script will be passed an array of arguments that contains any args passed into the locator followed by the element scoping the search. It should return an array of elements. |
Use as: by.binding()
Find an element by binding.
Example
{{person.name}}

var span1 = element(by.binding('person.name'));
expect(span1.getText()).toBe('Foo');
var span2 = element(by.binding('person.email'));
expect(span2.getText()).toBe('foo@bar.com');
Params
| Param |
Type |
Description |
| bindingDescriptor |
string |
|
Returns
| Type |
Description |
| {findElementsOverride: findElementsOverride, toString: Function|string} |
|
Use as: by.exactBinding()
Find an element by exact binding.
Example
{{ person.name }}

{{person_phone|uppercase}}
expect(element(by.exactBinding('person.name')).isPresent()).toBe(true);
expect(element(by.exactBinding('person-email')).isPresent()).toBe(true);
expect(element(by.exactBinding('person')).isPresent()).toBe(false);
expect(element(by.exactBinding('person_phone')).isPresent()).toBe(true);
expect(element(by.exactBinding('person_phone|uppercase')).isPresent()).toBe(true);
expect(element(by.exactBinding('phone')).isPresent()).toBe(false);
Params
| Param |
Type |
Description |
| bindingDescriptor |
string |
|
Returns
| Type |
Description |
| {findElementsOverride: findElementsOverride, toString: Function|string} |
|
Use as: by.model(modelName)
Find an element by ng-model expression.
Example
<input type="text" ng-model="person.name"/>
var input = element(by.model('person.name'));
input.sendKeys('123');
expect(input.getAttribute('value')).toBe('Foo123');
Params
| Param |
Type |
Description |
| model |
string |
ng-model expression. |
Find a button by text.
Example
element(by.buttonText('Save'));
Params
| Param |
Type |
Description |
| searchText |
string |
|
Returns
| Type |
Description |
| {findElementsOverride: findElementsOverride, toString: Function|string} |
|
Find a button by partial text.
Example
<button>Save my file</button>
element(by.partialButtonText('Save'));
Params
| Param |
Type |
Description |
| searchText |
string |
|
Returns
| Type |
Description |
| {findElementsOverride: findElementsOverride, toString: Function|string} |
|
Find elements inside an ng-repeat.
Example

{{cat.name}}
{{cat.age}}

{{$index}}

{{book.name}}

{{book.blurb}}

// Returns the DIV for the second cat.
var secondCat = element(by.repeater('cat in pets').row(1));
// Returns the SPAN for the first cat's name.
var firstCatName = element(by.repeater('cat in pets').
row(0).column('{{cat.name}}'));
// Returns a promise that resolves to an array of WebElements from a column
var ages = element.all(
by.repeater('cat in pets').column('{{cat.age}}'));
// Returns a promise that resolves to an array of WebElements containing
// all top level elements repeated by the repeater. For 2 pets rows resolves
// to an array of 2 elements.
var rows = element.all(by.repeater('cat in pets'));
// Returns a promise that resolves to an array of WebElements containing all
// the elements with a binding to the book's name.
var divs = element.all(by.repeater('book in library').column('book.name'));
// Returns a promise that resolves to an array of WebElements containing
// the DIVs for the second book.
var bookInfo = element.all(by.repeater('book in library').row(1));
// Returns the H4 for the first book's name.
var firstBookName = element(by.repeater('book in library').
row(0).column('{{book.name}}'));
// Returns a promise that resolves to an array of WebElements containing
// all top level elements repeated by the repeater. For 2 books divs
// resolves to an array of 4 elements.
var divs = element.all(by.repeater('book in library'));
Find elements by CSS which contain a certain string.
Example

Dog

Cat

// Returns the DIV for the dog, but not cat.
var dog = element(by.cssContainingText('.pet', 'Dog'));
Use as: by.options(optionsDescriptor)
Find an element by ng-options expression.
Example
<select ng-model="color" ng-options="c for c in colors">
<option value="0" selected="selected">red</option>
<option value="1">green</option>
</select>
var allOptions = element.all(by.options('c for c in colors'));
expect(allOptions.count()).toEqual(2);
var firstOption = allOptions.first();
expect(firstOption.getText()).toEqual('red');
Params
| Param |
Type |
Description |
| optionsDescriptor |
string |
ng-options expression. |
Creates a new WebDriver client, which provides control over a browser.
Every WebDriver command returns a {@code webdriver.promise.Promise} that
represents the result of that command. Callbacks may be registered on this
object to manipulate the command result or catch an expected error. Any
commands scheduled with a callback are considered sub-commands and will
execute before the next command in the current frame. For example:
var message = [];
driver.call(message.push, message, 'a').then(function() {
driver.call(message.push, message, 'b');
});
driver.call(message.push, message, 'c');
driver.call(function() {
alert('message is abc? ' + (message.join('') == 'abc'));
});
Params
| Param |
Type |
Description |
| session |
!(webdriver.Session|webdriver.promise.Promise) |
Either a known session or a promise that will be resolved to a session. |
| executor |
!webdriver.CommandExecutor |
The executor to use when sending commands to the browser. |
| opt_flow |
webdriver.promise.ControlFlow= |
The flow to schedule commands through. Defaults to the active flow object. |
Creates a new WebDriver client for an existing session.
Params
| Param |
Type |
Description |
| executor |
!webdriver.CommandExecutor |
Command executor to use when querying for session details. |
| sessionId |
string |
ID of the session to attach to. |
Returns
Creates a new WebDriver session.
Params
| Param |
Type |
Description |
| executor |
!webdriver.CommandExecutor |
The executor to create the new session with. |
| desiredCapabilities |
!webdriver.Capabilities |
The desired capabilities for the new session. |
Returns
Returns
| Type |
Description |
| !webdriver.promise.ControlFlow |
The control flow used by this instance. |
Schedules a {@code webdriver.Command} to be executed by this driver's
{@code webdriver.CommandExecutor}.
Params
| Param |
Type |
Description |
| command |
!webdriver.Command |
The command to schedule. |
| description |
string |
A description of the command for debugging. |
Returns
| Type |
Description |
| !webdriver.promise.Promise.<T> |
A promise that will be resolved with the command result. |
Returns
| Type |
Description |
| !webdriver.promise.Promise.<!webdriver.Session> |
A promise for this client's session. |
Returns
| Type |
Description |
| !webdriver.promise.Promise.<!webdriver.Capabilities> |
A promise that will resolve with the this instance's capabilities. |
Schedules a command to quit the current session. After calling quit, this
instance will be invalidated and may no longer be used to issue commands
against the browser.
Returns
| Type |
Description |
| !webdriver.promise.Promise.<void> |
A promise that will be resolved when the command has completed. |
Creates a new action sequence using this driver. The sequence will not be
scheduled for execution until {@link webdriver.ActionSequence#perform} is
called. Example:
driver.actions().
mouseDown(element1).
mouseMove(element2).
mouseUp().
perform();
Returns
| Type |
Description |
| !webdriver.ActionSequence |
A new action sequence for this instance. |
Schedules a command to execute JavaScript in the context of the currently
selected frame or window. The script fragment will be executed as the body
of an anonymous function. If the script is provided as a function object,
that function will be converted to a string for injection into the target
window.
Any arguments provided in addition to the script will be included as script
arguments and may be referenced using the {@code arguments} object.
Arguments may be a boolean, number, string, or {@code webdriver.WebElement}.
Arrays and objects may also be used as script arguments as long as each item
adheres to the types previously mentioned.
The script may refer to any variables accessible from the current window.
Furthermore, the script will execute in the window's context, thus
{@code document} may be used to refer to the current document. Any local
variables will not be available once the script has finished executing,
though global variables will persist.
If the script has a return value (i.e. if the script contains a return
statement), then the following steps will be taken for resolving this
functions return value:
- For a HTML element, the value will resolve to a
{@code webdriver.WebElement}
- Null and undefined return values will resolve to null
- Booleans, numbers, and strings will resolve as is
- Functions will resolve to their string representation
- For arrays and objects, each member item will be converted according to
the rules above
Params
| Param |
Type |
Description |
| script |
!(string|Function) |
The script to execute. |
| var_args |
...* |
The arguments to pass to the script. |
Returns
| Type |
Description |
| !webdriver.promise.Promise.<T> |
A promise that will resolve to the scripts return value. |
Schedules a command to execute asynchronous JavaScript in the context of the
currently selected frame or window. The script fragment will be executed as
the body of an anonymous function. If the script is provided as a function
object, that function will be converted to a string for injection into the
target window.
Any arguments provided in addition to the script will be included as script
arguments and may be referenced using the {@code arguments} object.
Arguments may be a boolean, number, string, or {@code webdriver.WebElement}.
Arrays and objects may also be used as script arguments as long as each item
adheres to the types previously mentioned.
Unlike executing synchronous JavaScript with
{@code webdriver.WebDriver.prototype.executeScript}, scripts executed with
this function must explicitly signal they are finished by invoking the
provided callback. This callback will always be injected into the
executed function as the last argument, and thus may be referenced with
{@code arguments[arguments.length - 1]}. The following steps will be taken
for resolving this functions return value against the first argument to the
script's callback function:
- For a HTML element, the value will resolve to a
{@code webdriver.WebElement}
- Null and undefined return values will resolve to null
- Booleans, numbers, and strings will resolve as is
- Functions will resolve to their string representation
- For arrays and objects, each member item will be converted according to
the rules above
Example #1: Performing a sleep that is synchronized with the currently
selected window:
var start = new Date().getTime();
driver.executeAsyncScript(
'window.setTimeout(arguments[arguments.length - 1], 500);').
then(function() {
console.log('Elapsed time: ' + (new Date().getTime() - start) + ' ms');
});
Example #2: Synchronizing a test with an AJAX application:
var button = driver.findElement(By.id('compose-button'));
button.click();
driver.executeAsyncScript(
'var callback = arguments[arguments.length - 1];' +
'mailClient.getComposeWindowWidget().onload(callback);');
driver.switchTo().frame('composeWidget');
driver.findElement(By.id('to')).sendKEys('dog@example.com');
Example #3: Injecting a XMLHttpRequest and waiting for the result. In this
example, the inject script is specified with a function literal. When using
this format, the function is converted to a string for injection, so it
should not reference any symbols not defined in the scope of the page under
test.
driver.executeAsyncScript(function() {
var callback = arguments[arguments.length - 1];
var xhr = new XMLHttpRequest();
xhr.open("GET", "/resource/data.json", true);
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
callback(xhr.resposneText);
}
}
xhr.send('');
}).then(function(str) {
console.log(JSON.parse(str)['food']);
});
Params
| Param |
Type |
Description |
| script |
!(string|Function) |
The script to execute. |
| var_args |
...* |
The arguments to pass to the script. |
Returns
| Type |
Description |
| !webdriver.promise.Promise.<T> |
A promise that will resolve to the scripts return value. |
Schedules a command to execute a custom function.
Params
| Param |
Type |
Description |
| fn |
function(...): (T|webdriver.promise.Promise.<T>) |
The function to execute. |
| opt_scope |
Object= |
The object in whose scope to execute the function. |
| var_args |
...* |
Any arguments to pass to the function. |
Returns
| Type |
Description |
| !webdriver.promise.Promise.<T> |
A promise that will be resolved' with the function's result. |
Schedules a command to wait for a condition to hold, as defined by some
user supplied function. If any errors occur while evaluating the wait, they
will be allowed to propagate.
In the event a condition returns a {@link webdriver.promise.Promise}, the
polling loop will wait for it to be resolved and use the resolved value for
evaluating whether the condition has been satisfied. The resolution time for
a promise is factored into whether a wait has timed out.
Params
| Param |
Type |
Description |
| fn |
function():boolean |
The function to evaluate as a wait condition. |
| timeout |
number |
How long to wait for the condition to be true. |
| opt_message |
string= |
An optional message to use if the wait times out. |
Returns
| Type |
Description |
| !webdriver.promise.Promise |
A promise that will be resolved when the wait condition has been satisfied. |
Schedules a command to make the driver sleep for the given amount of time.
Params
| Param |
Type |
Description |
| ms |
number |
The amount of time, in milliseconds, to sleep. |
Returns
| Type |
Description |
| !webdriver.promise.Promise.<void> |
A promise that will be resolved when the sleep has finished. |
Schedules a command to retrieve they current window handle.
Returns
| Type |
Description |
| !webdriver.promise.Promise.<string> |
A promise that will be resolved with the current window handle. |
Schedules a command to retrieve the current list of available window handles.
Returns
| Type |
Description |
| !webdriver.promise.Promise.<!Array.<string>> |
A promise that will be resolved with an array of window handles. |
Schedules a command to retrieve the current page's source. The page source
returned is a representation of the underlying DOM: do not expect it to be
formatted or escaped in the same way as the response sent from the web
server.
Returns
| Type |
Description |
| !webdriver.promise.Promise.<string> |
A promise that will be resolved with the current page source. |
Schedules a command to close the current window.
Returns
| Type |
Description |
| !webdriver.promise.Promise.<void> |
A promise that will be resolved when this command has completed. |
Schedules a command to navigate to the given URL.
Params
| Param |
Type |
Description |
| url |
string |
The fully qualified URL to open. |
Returns
| Type |
Description |
| !webdriver.promise.Promise.<void> |
A promise that will be resolved when the document has finished loading. |
Schedules a command to retrieve the URL of the current page.
Returns
| Type |
Description |
| !webdriver.promise.Promise.<string> |
A promise that will be resolved with the current URL. |
Schedules a command to retrieve the current page's title.
Returns
| Type |
Description |
| !webdriver.promise.Promise.<string> |
A promise that will be resolved with the current page's title. |
Schedule a command to find an element on the page. If the element cannot be
found, a {@link bot.ErrorCode.NO_SUCH_ELEMENT} result will be returned
by the driver. Unlike other commands, this error cannot be suppressed. In
other words, scheduling a command to find an element doubles as an assert
that the element is present on the page. To test whether an element is
present on the page, use {@link #isElementPresent} instead.
The search criteria for an element may be defined using one of the
factories in the {@link webdriver.By} namespace, or as a short-hand
{@link webdriver.By.Hash} object. For example, the following two statements
are equivalent:
var e1 = driver.findElement(By.id('foo'));
var e2 = driver.findElement({id:'foo'});
You may also provide a custom locator function, which takes as input
this WebDriver instance and returns a {@link webdriver.WebElement}, or a
promise that will resolve to a WebElement. For example, to find the first
visible link on a page, you could write:
var link = driver.findElement(firstVisibleLink);
function firstVisibleLink(driver) {
var links = driver.findElements(By.tagName('a'));
return webdriver.promise.filter(links, function(link) {
return links.isDisplayed();
}).then(function(visibleLinks) {
return visibleLinks[0];
});
}
When running in the browser, a WebDriver cannot manipulate DOM elements
directly; it may do so only through a {@link webdriver.WebElement} reference.
This function may be used to generate a WebElement from a DOM element. A
reference to the DOM element will be stored in a known location and this
driver will attempt to retrieve it through {@link #executeScript}. If the
element cannot be found (eg, it belongs to a different document than the
one this instance is currently focused on), a
{@link bot.ErrorCode.NO_SUCH_ELEMENT} error will be returned.
Params
| Param |
Type |
Description |
| locator |
!(webdriver.Locator|webdriver.By.Hash|Element|Function) |
The locator to use. |
Returns
| Type |
Description |
| !webdriver.WebElement
|
A WebElement that can be used to issue commands against the located element. If the element is not found, the element will be invalidated and all scheduled commands aborted. |
Schedules a command to test if an element is present on the page.
If given a DOM element, this function will check if it belongs to the
document the driver is currently focused on. Otherwise, the function will
test if at least one element can be found with the given search criteria.
Params
| Param |
Type |
Description |
| locatorOrElement |
!(webdriver.Locator|webdriver.By.Hash|Element| |
|
| Function) |
The locator to use, or the actual DOM element to be located by the server. |
|
Returns
| Type |
Description |
| !webdriver.promise.Promise.<boolean> |
A promise that will resolve with whether the element is present on the page. |
Schedule a command to search for multiple elements on the page.
Params
| Param |
Type |
Description |
| locator |
!(webdriver.Locator|webdriver.By.Hash|Function) |
The locator strategy to use when searching for the element. |
Returns
| Type |
Description |
| !webdriver.promise.Promise.<!Array.<!webdriver.WebElement>> |
A promise that will resolve to an array of WebElements. |
Schedule a command to take a screenshot. The driver makes a best effort to
return a screenshot of the following, in order of preference:
- Entire page
- Current window
- Visible portion of the current frame
- The screenshot of the entire display containing the browser
Returns
| Type |
Description |
| !webdriver.promise.Promise.<string> |
A promise that will be resolved to the screenshot as a base-64 encoded PNG. |
Returns
Returns
Returns
Interface for navigating back and forth in the browser history.
Params
Schedules a command to navigate to a new URL.
Params
| Param |
Type |
Description |
| url |
string |
The URL to navigate to. |
Returns
| Type |
Description |
| !webdriver.promise.Promise.<void> |
A promise that will be resolved when the URL has been loaded. |
Schedules a command to move backwards in the browser history.
Returns
| Type |
Description |
| !webdriver.promise.Promise.<void> |
A promise that will be resolved when the navigation event has completed. |
Schedules a command to move forwards in the browser history.
Returns
| Type |
Description |
| !webdriver.promise.Promise.<void> |
A promise that will be resolved when the navigation event has completed. |
Schedules a command to refresh the current page.
Returns
| Type |
Description |
| !webdriver.promise.Promise.<void> |
A promise that will be resolved when the navigation event has completed. |
Provides methods for managing browser and driver state.
Params
Schedules a command to add a cookie.
Params
| Param |
Type |
Description |
| name |
string |
The cookie name. |
| value |
string |
The cookie value. |
| opt_path |
string= |
The cookie path. |
| opt_domain |
string= |
The cookie domain. |
| opt_isSecure |
boolean= |
Whether the cookie is secure. |
| opt_expiry |
(number|!Date)= |
When the cookie expires. If specified as a number, should be in milliseconds since midnight, January 1, 1970 UTC. |
Returns
| Type |
Description |
| !webdriver.promise.Promise.<void> |
A promise that will be resolved when the cookie has been added to the page. |
Schedules a command to delete all cookies visible to the current page.
Returns
| Type |
Description |
| !webdriver.promise.Promise.<void> |
A promise that will be resolved when all cookies have been deleted. |
Schedules a command to delete the cookie with the given name. This command is
a no-op if there is no cookie with the given name visible to the current
page.
Params
| Param |
Type |
Description |
| name |
string |
The name of the cookie to delete. |
Returns
| Type |
Description |
| !webdriver.promise.Promise.<void> |
A promise that will be resolved when the cookie has been deleted. |
Schedules a command to retrieve all cookies visible to the current page.
Each cookie will be returned as a JSON object as described by the WebDriver
wire protocol.
Returns
!webdriver.promise.Promise.<
!Array.<webdriver.WebDriver.Options.Cookie>> | A promise that will be resolved with the cookies visible to the current page.
Schedules a command to retrieve the cookie with the given name. Returns null
if there is no such cookie. The cookie will be returned as a JSON object as
described by the WebDriver wire protocol.
Params
| Param |
Type |
Description |
| name |
string |
The name of the cookie to retrieve. |
Returns
| Type |
Description |
| !webdriver.promise.Promise.<?webdriver.WebDriver.Options.Cookie> |
A promise that will be resolved with the named cookie, or {@code null} if there is no such cookie. |
Returns
Returns
Returns
An interface for managing timeout behavior for WebDriver instances.
Params
Specifies the amount of time the driver should wait when searching for an
element if it is not immediately present.
When searching for a single element, the driver should poll the page
until the element has been found, or this timeout expires before failing
with a {@code bot.ErrorCode.NO_SUCH_ELEMENT} error. When searching
for multiple elements, the driver should poll the page until at least one
element has been found or this timeout has expired.
Setting the wait timeout to 0 (its default value), disables implicit
waiting.
Increasing the implicit wait timeout should be used judiciously as it
will have an adverse effect on test run time, especially when used with
slower location strategies like XPath.
Params
| Param |
Type |
Description |
| ms |
number |
The amount of time to wait, in milliseconds. |
Returns
| Type |
Description |
| !webdriver.promise.Promise.<void> |
A promise that will be resolved when the implicit wait timeout has been set. |
Sets the amount of time to wait, in milliseconds, for an asynchronous script
to finish execution before returning an error. If the timeout is less than or
equal to 0, the script will be allowed to run indefinitely.
Params
| Param |
Type |
Description |
| ms |
number |
The amount of time to wait, in milliseconds. |
Returns
| Type |
Description |
| !webdriver.promise.Promise.<void> |
A promise that will be resolved when the script timeout has been set. |
Sets the amount of time to wait for a page load to complete before returning
an error. If the timeout is negative, page loads may be indefinite.
Params
| Param |
Type |
Description |
| ms |
number |
The amount of time to wait, in milliseconds. |
Returns
| Type |
Description |
| !webdriver.promise.Promise.<void> |
A promise that will be resolved when the timeout has been set. |
An interface for managing the current window.
Params
Retrieves the window's current position, relative to the top left corner of
the screen.
Returns
| Type |
Description |
| !webdriver.promise.Promise.<{x: number, y: number}> |
A promise that will be resolved with the window's position in the form of a {x:number, y:number} object literal. |
Repositions the current window.
Params
| Param |
Type |
Description |
| x |
number |
The desired horizontal position, relative to the left side of the screen. |
| y |
number |
The desired vertical position, relative to the top of the of the screen. |
Returns
| Type |
Description |
| !webdriver.promise.Promise.<void> |
A promise that will be resolved when the command has completed. |
Retrieves the window's current size.
Returns
| Type |
Description |
| !webdriver.promise.Promise.<{width: number, height: number}> |
A promise that will be resolved with the window's size in the form of a {width:number, height:number} object literal. |
Resizes the current window.
Params
| Param |
Type |
Description |
| width |
number |
The desired window width. |
| height |
number |
The desired window height. |
Returns
| Type |
Description |
| !webdriver.promise.Promise.<void> |
A promise that will be resolved when the command has completed. |
Maximizes the current window.
Returns
| Type |
Description |
| !webdriver.promise.Promise.<void> |
A promise that will be resolved when the command has completed. |
Interface for managing WebDriver log records.
Params
Fetches available log entries for the given type.
Note that log buffers are reset after each call, meaning that
available log entries correspond to those entries not yet returned for a
given log type. In practice, this means that this call will return the
available log entries since the last call, or from the start of the
session.
Params
| Param |
Type |
Description |
| type |
!webdriver.logging.Type |
The desired log type. |
Returns
| Type |
Description |
| !webdriver.promise.Promise.<!Array.<!webdriver.logging.Entry>> |
A promise that will resolve to a list of log entries for the specified type. |
Retrieves the log types available to this driver.
Returns
| Type |
Description |
| !webdriver.promise.Promise.<!Array.<!webdriver.logging.Type>> |
A promise that will resolve to a list of available log types. |
An interface for changing the focus of the driver to another frame or window.
Params
Schedules a command retrieve the {@code document.activeElement} element on
the current document, or {@code document.body} if activeElement is not
available.
Returns
Schedules a command to switch focus of all future commands to the first frame
on the page.
Returns
| Type |
Description |
| !webdriver.promise.Promise.<void> |
A promise that will be resolved when the driver has changed focus to the default content. |
Schedules a command to switch the focus of all future commands to another
frame on the page.
If the frame is specified by a number, the command will switch to the frame
by its (zero-based) index into the {@code window.frames} collection.
If the frame is specified by a string, the command will select the frame by
its name or ID. To select sub-frames, simply separate the frame names/IDs by
dots. As an example, "main.child" will select the frame with the name "main"
and then its child "child".
If the specified frame can not be found, the deferred result will errback
with a {@code bot.ErrorCode.NO_SUCH_FRAME} error.
Params
| Param |
Type |
Description |
| nameOrIndex |
string|number |
The frame locator. |
Returns
| Type |
Description |
| !webdriver.promise.Promise.<void> |
A promise that will be resolved when the driver has changed focus to the specified frame. |
Schedules a command to switch the focus of all future commands to another
window. Windows may be specified by their {@code window.name} attribute or
by its handle (as returned by {@code webdriver.WebDriver#getWindowHandles}).
If the specificed window can not be found, the deferred result will errback
with a {@code bot.ErrorCode.NO_SUCH_WINDOW} error.
Params
| Param |
Type |
Description |
| nameOrHandle |
string |
The name or window handle of the window to switch focus to. |
Returns
| Type |
Description |
| !webdriver.promise.Promise.<void> |
A promise that will be resolved when the driver has changed focus to the specified window. |
Schedules a command to change focus to the active alert dialog. This command
will return a {@link bot.ErrorCode.NO_MODAL_DIALOG_OPEN} error if a modal
dialog is not currently open.
Returns
Simulate pressing many keys at once in a "chord". Takes a sequence of
{@link webdriver.Key}s or strings, appends each of the values to a string,
and adds the chord termination key ({@link webdriver.Key.NULL}) and returns
the resultant string.
Note: when the low-level webdriver key handlers see Keys.NULL, active
modifier keys (CTRL/ALT/SHIFT/etc) release via a keyup event.
Params
| Param |
Type |
Description |
| var_args |
...string |
The key sequence to concatenate. |
Returns
| Type |
Description |
| string |
The null-terminated key sequence. |
Represents a DOM element. WebElements can be found by searching from the
document root using a {@code webdriver.WebDriver} instance, or by searching
under another {@code webdriver.WebElement}:
driver.get('http://www.google.com');
var searchForm = driver.findElement(By.tagName('form'));
var searchBox = searchForm.findElement(By.name('q'));
searchBox.sendKeys('webdriver');
The WebElement is implemented as a promise for compatibility with the promise
API. It will always resolve itself when its internal state has been fully
resolved and commands may be issued against the element. This can be used to
catch errors when an element cannot be located on the page:
driver.findElement(By.id('not-there')).then(function(element) {
alert('Found an element that was not expected to be there!');
}, function(error) {
alert('The element was not found, as expected');
});
Params
| Param |
Type |
Description |
| driver |
!webdriver.WebDriver
|
The parent WebDriver instance for this element. |
| id |
!(string|webdriver.promise.Promise) |
Either the opaque ID for the underlying DOM element assigned by the server, or a promise that will resolve to that ID or another WebElement. |
Compares to WebElements for equality.
Params
Returns
| Type |
Description |
| !webdriver.promise.Promise.<boolean> |
A promise that will be resolved to whether the two WebElements are equal. |
Returns
Returns
| Type |
Description |
| !webdriver.promise.Promise.<webdriver.WebElement.Id> |
A promise that resolves to this element's JSON representation as defined by the WebDriver wire protocol. |
Schedule a command to find a descendant of this element. If the element
cannot be found, a {@code bot.ErrorCode.NO_SUCH_ELEMENT} result will
be returned by the driver. Unlike other commands, this error cannot be
suppressed. In other words, scheduling a command to find an element doubles
as an assert that the element is present on the page. To test whether an
element is present on the page, use {@code #isElementPresent} instead.
The search criteria for an element may be defined using one of the
factories in the {@link webdriver.By} namespace, or as a short-hand
{@link webdriver.By.Hash} object. For example, the following two statements
are equivalent:
var e1 = element.findElement(By.id('foo'));
var e2 = element.findElement({id:'foo'});
You may also provide a custom locator function, which takes as input
this WebDriver instance and returns a {@link webdriver.WebElement}, or a
promise that will resolve to a WebElement. For example, to find the first
visible link on a page, you could write:
var link = element.findElement(firstVisibleLink);
function firstVisibleLink(element) {
var links = element.findElements(By.tagName('a'));
return webdriver.promise.filter(links, function(link) {
return links.isDisplayed();
}).then(function(visibleLinks) {
return visibleLinks[0];
});
}
Params
| Param |
Type |
Description |
| locator |
!(webdriver.Locator|webdriver.By.Hash|Function) |
The locator strategy to use when searching for the element. |
Returns
| Type |
Description |
| !webdriver.WebElement
|
A WebElement that can be used to issue commands against the located element. If the element is not found, the element will be invalidated and all scheduled commands aborted. |
Schedules a command to test if there is at least one descendant of this
element that matches the given search criteria.
Params
| Param |
Type |
Description |
| locator |
!(webdriver.Locator|webdriver.By.Hash|Function) |
The locator strategy to use when searching for the element. |
Returns
| Type |
Description |
| !webdriver.promise.Promise.<boolean> |
A promise that will be resolved with whether an element could be located on the page. |
Schedules a command to find all of the descendants of this element that
match the given search criteria.
Params
| Param |
Type |
Description |
| locator |
!(webdriver.Locator|webdriver.By.Hash|Function) |
The locator strategy to use when searching for the elements. |
Returns
| Type |
Description |
| !webdriver.promise.Promise.<!Array.<!webdriver.WebElement>> |
A promise that will resolve to an array of WebElements. |
Schedules a command to click on this element.
Returns
| Type |
Description |
| !webdriver.promise.Promise.<void> |
A promise that will be resolved when the click command has completed. |
Schedules a command to type a sequence on the DOM element represented by this
instance.
Modifier keys (SHIFT, CONTROL, ALT, META) are stateful; once a modifier is
processed in the keysequence, that key state is toggled until one of the
following occurs:
- The modifier key is encountered again in the sequence. At this point the
state of the key is toggled (along with the appropriate keyup/down events).
- The {@code webdriver.Key.NULL} key is encountered in the sequence. When
this key is encountered, all modifier keys current in the down state are
released (with accompanying keyup events). The NULL key can be used to
simulate common keyboard shortcuts:
element.sendKeys("text was",
webdriver.Key.CONTROL, "a", webdriver.Key.NULL,
"now text is");
// Alternatively:
element.sendKeys("text was",
webdriver.Key.chord(webdriver.Key.CONTROL, "a"),
"now text is");
- The end of the keysequence is encountered. When there are no more keys
to type, all depressed modifier keys are released (with accompanying keyup
events).
Note: On browsers where native keyboard events are not yet
supported (e.g. Firefox on OS X), key events will be synthesized. Special
punctionation keys will be synthesized according to a standard QWERTY en-us
keyboard layout.
Params
| Param |
Type |
Description |
| var_args |
...string |
The sequence of keys to type. All arguments will be joined into a single sequence (var_args is permitted for convenience). |
Returns
| Type |
Description |
| !webdriver.promise.Promise.<void> |
A promise that will be resolved when all keys have been typed. |
Schedules a command to query for the tag/node name of this element.
Returns
| Type |
Description |
| !webdriver.promise.Promise.<string> |
A promise that will be resolved with the element's tag name. |
Schedules a command to query for the computed style of the element
represented by this instance. If the element inherits the named style from
its parent, the parent will be queried for its value. Where possible, color
values will be converted to their hex representation (e.g. #00ff00 instead of
rgb(0, 255, 0)).
Warning: the value returned will be as the browser interprets it, so
it may be tricky to form a proper assertion.
Params
| Param |
Type |
Description |
| cssStyleProperty |
string |
The name of the CSS style property to look up. |
Returns
| Type |
Description |
| !webdriver.promise.Promise.<string> |
A promise that will be resolved with the requested CSS value. |
Schedules a command to query for the value of the given attribute of the
element. Will return the current value, even if it has been modified after
the page has been loaded. More exactly, this method will return the value of
the given attribute, unless that attribute is not present, in which case the
value of the property with the same name is returned. If neither value is
set, null is returned (for example, the "value" property of a textarea
element). The "style" attribute is converted as best can be to a
text representation with a trailing semi-colon. The following are deemed to
be "boolean" attributes and will return either "true" or null:
async, autofocus, autoplay, checked, compact, complete, controls, declare,
defaultchecked, defaultselected, defer, disabled, draggable, ended,
formnovalidate, hidden, indeterminate, iscontenteditable, ismap, itemscope,
loop, multiple, muted, nohref, noresize, noshade, novalidate, nowrap, open,
paused, pubdate, readonly, required, reversed, scoped, seamless, seeking,
selected, spellcheck, truespeed, willvalidate
Finally, the following commonly mis-capitalized attribute/property names
are evaluated as expected:
Params
| Param |
Type |
Description |
| attributeName |
string |
The name of the attribute to query. |
Returns
| Type |
Description |
| !webdriver.promise.Promise.<?string> |
A promise that will be resolved with the attribute's value. The returned value will always be either a string or null. |
Get the visible (i.e. not hidden by CSS) innerText of this element, including
sub-elements, without any leading or trailing whitespace.
Returns
| Type |
Description |
| !webdriver.promise.Promise.<string> |
A promise that will be resolved with the element's visible text. |
Schedules a command to compute the size of this element's bounding box, in
pixels.
Returns
| Type |
Description |
| !webdriver.promise.Promise.<{width: number, height: number}> |
A promise that will be resolved with the element's size as a {@code {width:number, height:number}} object. |
Schedules a command to compute the location of this element in page space.
Returns
| Type |
Description |
| !webdriver.promise.Promise.<{x: number, y: number}> |
A promise that will be resolved to the element's location as a {@code {x:number, y:number}} object. |
Schedules a command to query whether the DOM element represented by this
instance is enabled, as dicted by the {@code disabled} attribute.
Returns
| Type |
Description |
| !webdriver.promise.Promise.<boolean> |
A promise that will be resolved with whether this element is currently enabled. |
Schedules a command to query whether this element is selected.
Returns
| Type |
Description |
| !webdriver.promise.Promise.<boolean> |
A promise that will be resolved with whether this element is currently selected. |
Schedules a command to submit the form containing this element (or this
element if it is a FORM element). This command is a no-op if the element is
not contained in a form.
Returns
| Type |
Description |
| !webdriver.promise.Promise.<void> |
A promise that will be resolved when the form has been submitted. |
Schedules a command to clear the {@code value} of this element. This command
has no effect if the underlying DOM element is neither a text INPUT element
nor a TEXTAREA element.
Returns
| Type |
Description |
| !webdriver.promise.Promise.<void> |
A promise that will be resolved when the element has been cleared. |
Schedules a command to test whether this element is currently displayed.
Returns
| Type |
Description |
| !webdriver.promise.Promise.<boolean> |
A promise that will be resolved with whether this element is currently visible on the page. |
Schedules a command to retrieve the outer HTML of this element.
Returns
| Type |
Description |
| !webdriver.promise.Promise.<string> |
A promise that will be resolved with the element's outer HTML. |
Schedules a command to retrieve the inner HTML of this element.
Returns
| Type |
Description |
| !webdriver.promise.Promise.<string> |
A promise that will be resolved with the element's inner HTML. |
Represents a modal dialog such as {@code alert}, {@code confirm}, or
{@code prompt}. Provides functions to retrieve the message displayed with
the alert, accept or dismiss the alert, and set the response text (in the
case of {@code prompt}).
Params
| Param |
Type |
Description |
| driver |
!webdriver.WebDriver
|
The driver controlling the browser this alert is attached to. |
| text |
!(string|webdriver.promise.Promise.<string>) |
Either the message text displayed with this alert, or a promise that will be resolved to said text. |
Retrieves the message text displayed with this alert. For instance, if the
alert were opened with alert("hello"), then this would return "hello".
Returns
| Type |
Description |
| !webdriver.promise.Promise.<string> |
A promise that will be resolved to the text displayed with this alert. |
Accepts this alert.
Returns
| Type |
Description |
| !webdriver.promise.Promise.<void> |
A promise that will be resolved when this command has completed. |
Dismisses this alert.
Returns
| Type |
Description |
| !webdriver.promise.Promise.<void> |
A promise that will be resolved when this command has completed. |
Sets the response text on this alert. This command will return an error if
the underlying alert does not support response text (e.g. window.alert and
window.confirm).
Params
| Param |
Type |
Description |
| text |
string |
The text to set. |
Returns
| Type |
Description |
| !webdriver.promise.Promise.<void> |
A promise that will be resolved when this command has completed. |
An error returned to indicate that there is an unhandled modal dialog on the
current page.
Params
| Param |
Type |
Description |
| message |
string |
The error message. |
| alert |
!webdriver.Alert
|
The alert handle. |
Returns