Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bootstraponline committed May 22, 2015
1 parent d5e4ab7 commit b1c71c1
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions docs/sync.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,40 +12,40 @@ remains available however it's not recommended for use.

## waitForAngular

`waitForAngular` is protractors second method for syncing with Angular.
`waitForAngular` is protractor's second method for syncing with Angular.
`waitForAngular` is automatically invoked before selected webdriver commands
to eliminate the need for waits.

The following webdriver commands all execute `waitForAngular` before running.
The following webdriver commands execute `waitForAngular` before running.
The single exception is `get`, in that case `waitForAngular` executes after
the `get` command completes.

Internal Command | Driver command
--- | ---
:getCurrentUrl | driver.current_url
:get | driver.get 'http://www.angularjs.org'
:refresh, | driver.navigate.refresh
:getPageSource | driver.page_source
:getTitle | driver.title
:findElement | driver.find_element(:tag_name, 'html')
:findElements | driver.find_elements(:tag_name, 'html')
:findChildElement | driver.find_element(:tag_name, 'html').find_element(:xpath, '//html')
:findChildElements | driver.find_element(:tag_name, 'html').find_elements(:xpath, '//html')
Internal Command | Driver command
--- | ---
`:getCurrentUrl` | driver.current_url
`:get` | driver.get 'http://www.angularjs.org'
`:refresh` | driver.navigate.refresh
`:getPageSource` | driver.page_source
`:getTitle` | driver.title
`:findElement` | driver.find_element(:tag_name, 'html')
`:findElements` | driver.find_elements(:tag_name, 'html')
`:findChildElement` | driver.find_element(:tag_name, 'html').find_element(:xpath, '//html')
`:findChildElements` | driver.find_element(:tag_name, 'html').find_elements(:xpath, '//html')

The following custom Protractor commands also automatically execute `waitForAngular`

Protractor Command | Note
--- | ---
Protractor.get 'url' | driver.get redirects to protractor.get
Protractor.setLocation 'url' | Note this is unrelated to the selenium setLocation for geographic position
Protractor.getLocationAbsUrl |
Protractor.sync | Internal method used to sync webdriver commands. Not for end users.
Protractor Command | Note
--- | ---
`Protractor.get 'url'` | driver.get redirects to protractor.get
`Protractor.setLocation 'url'` | Note this is unrelated to the selenium setLocation for geographic position
`Protractor.getLocationAbsUrl` |
`Protractor.sync` | Internal method used to sync webdriver commands. Not for end users.


Sync can be toggled by running:

`protractor.ignore_sync = true` - Don't run waitForAngular
`protractor.ignore_sync = false` - Run waitForAngular
- `protractor.ignore_sync = true` Don't run waitForAngular
- `protractor.ignore_sync = false` Run waitForAngular

To get always get a url without syncing use:

Expand Down

0 comments on commit b1c71c1

Please sign in to comment.