Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
docs(debugging): change debugging info for element explorer
Browse files Browse the repository at this point in the history
  • Loading branch information
hankduan committed Jan 13, 2015
1 parent aa40df1 commit f7d32c3
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions docs/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,29 +170,36 @@ When debugging or first writing test suites, you may find it helpful to
try out Protractor commands without starting up the entire test suite. You can
do this with the element explorer.

Currently, the explorer runs only with chrome and expects a standalone Selenium
Server to be running at http://localhost:4444 (see [Setting Up the Selenium Server](/docs/server-setup.md)).
To run element explorer, simply run protractor as you normally would, but pass in
the flag --elementExplorer:

From the Protractor directory, run with:

node ./bin/elementexplorer.js <urL>
protractor --elementExplorer

This will load up the URL on WebDriver and put the terminal into a REPL loop.
You will see a > prompt. The `browser`, `element` and `protractor` variables will
be available. Enter a command such as:

> element(by.id('foobar')).getText()
> browser.get('http://www.angularjs.org')

or

> browser.get('http://www.angularjs.org')
> element(by.id('foobar')).getText()

Typing tab at a blank prompt will fill in a suggestion for finding
elements. You can also use the `list(locator)` command to list all elements
matching a locator.

To get a list of functions you can call, try:
Element explorer will start chrome by default. However, you can specify
another browser, change browser settings, or specify any other config that you
normally would with your protractor test. To do this, pass configs to
protractor like you normally would,
but with the `--elementExplorer` flag set:

> browser
protractor --elementExplorer [options] [configFile]

Typing tab at a blank prompt will fill in a suggestion for finding
elements.
Element explore will ignore your specs, not set up your framework (e.g. jasmine,
mocha, cucumber), and only allow you to pass in 1 capability, but will honor
every other parameter in your config.


Taking Screenshots
Expand Down

0 comments on commit f7d32c3

Please sign in to comment.