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

feat(elementExplorer): Combine browser.pause with elementExplorer #1693

Closed
wants to merge 2 commits into from

Conversation

hankduan
Copy link
Contributor

@hankduan hankduan commented Jan 7, 2015

Closes #1314, #1315


if (!configFile && !argv.elementExplorer && args.length < 3) {
console.log('you must either specify a configuration file ' +
'or at least 3 options. See "protractor --help" for more info.');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's show help here automatically as well.

@juliemr
Copy link
Member

juliemr commented Jan 13, 2015

Awesome, looks good overall, just a couple clarification comments.

@juliemr
Copy link
Member

juliemr commented Jan 13, 2015

And I assume a following PR will change the docs and the element explorer binary?

@hankduan
Copy link
Contributor Author

I'll send a follow up PR to change the docs. I was thinking of removing the element explorer binary since you can just do 'protractor --elementExplorer'. I can keep the binary too, but it would just be a one-liner. What do you think?

@juliemr
Copy link
Member

juliemr commented Jan 13, 2015

Let's keep the one liner binary for discoverability.

@hankduan
Copy link
Contributor Author

Addressed comments.

@juliemr
Copy link
Member

juliemr commented Jan 13, 2015

Great - let me do one more run-through and actually try it out on my computer and then I'll LGTM.

* reuse logic for browser.pause for elementExplorer
* introduce browser.enterRepl
* allow customization of driver for elementExplorer
* fix bug where repl cannot return an ElementFinder (related angular#1600)

Closes angular#1314, angular#1315
@hankduan hankduan force-pushed the combineElementExplorer branch from c6822ac to 5b755bd Compare January 13, 2015 01:49
@hankduan
Copy link
Contributor Author

Docs: #1717


startUp();
console.log('Please use "protractor --elementExplorer [options] [configFile]"' +
' for full functionality\n');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change this to

Please use protractor [configFile] [options] --elementExplorer

The order can be very confusing if, for example, you run

protractor --elementExplorer myConfig.js

This will actually ignore myConfig.js because optimist interprets it as the value of elementExplorer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

@hankduan hankduan force-pushed the combineElementExplorer branch from 5b755bd to 042eec8 Compare January 13, 2015 22:28
@juliemr
Copy link
Member

juliemr commented Jan 13, 2015

LGTM

@hankduan
Copy link
Contributor Author

merged with fb099de

@hankduan hankduan closed this Jan 13, 2015
@tb
Copy link

tb commented Jan 28, 2015

How can I can access test scenario varibles in browser.enterRepl()? In particular I am interested to have access to libs/helpers/page objects loded via require, like: HttpBackend = require('http-backend-proxy')

Is this somehow related to #1607 ?

@hankduan
Copy link
Contributor Author

@tb I agree it sounds like a good feature to have. However, it is not possible right now since Protractor is running user code (repl code) in a vm. It might be possible to inject relevant helpers/librarys into the vm's context during the set up, but it would look something like context = {foo: 3, bar: function() {}}; browser.enterRepl(context); in other words, a user would need to pass those in. If this is something of use to you, please open a new feature request issue and we can track there.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add command for element explorer
4 participants