Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(debugger): fix issue where output does not display circular dep and ... #1889

Closed
wants to merge 1 commit into from

Conversation

hankduan
Copy link
Contributor

@hankduan hankduan commented Mar 3, 2015

...functions

then(function() {
var result = execFn_();
if (webdriver.promise.isPromise(result)) {
return result.then(function(val) {return val;});
Copy link
Contributor

Choose a reason for hiding this comment

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

What was the reason for this in the past? It doesn't appear to do anything

Copy link
Contributor Author

Choose a reason for hiding this comment

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

element(by.xyz).getText() is an elementFinder/promise.
When someone enters element(by.xyz).getText(), we need to return the text value of the elementFinder (i.e. by calling then) instead of the text representation of the elementFinder.

execute: function(code) {
var execFn_ = function() {
// Run code through vm so that we can maintain a local scope which is
// isolated from the rest of the execution.
return vm_.runInThisContext(code);
var res = vm_.runInThisContext(code);
if(!webdriver.promise.isPromise(res)) {
Copy link
Member

Choose a reason for hiding this comment

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

nit: add a space after it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

@juliemr
Copy link
Member

juliemr commented Mar 10, 2015

LGTM sorry for the delay

@hankduan
Copy link
Contributor Author

merged in 5d23280

@hankduan hankduan closed this Mar 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants