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

Execute hangs when accessing variables from DalekJS scope #118

hadynz opened this Issue Jul 10, 2014 · 2 comments


None yet
4 participants
Copy link

hadynz commented Jul 10, 2014

If an execute function is invoked with a reference to a variable from the DalekJS scope, no error is thrown and DalekJS simply hangs.

var selectors = require('selectors.js');

// Hangs'')
   .execute(function () {
    var totalCost = window.document.querySelector(selectors.total_cost);
    this.assert.ok(totalCost.innerText === '20.00', 'Total Cost is correctly formatted');

// Completes Successfully'')
   .execute(function (totalCostSelector) {
    var totalCost = window.document.querySelector(totalCostSelector);
    this.assert.ok(totalCost.innerText === '20.00', 'Total Cost is correctly formatted');
}, selectors.total_cost)

It would be a better developer experience if DalekJS would throw an error with the exact nature of this problem.

Even though the documentation alludes to that execute can be called with parameters, it doesn't explain why that would be necessarily. Will submit a pull request for this for clarification.

@asciidisco asciidisco added the docs label Jul 23, 2014

@asciidisco asciidisco self-assigned this Jul 23, 2014


This comment has been minimized.

Copy link

asciidisco commented Jul 23, 2014

The problem/situation should be made more obvious in the docs.


This comment has been minimized.

Copy link

askilada commented Jan 29, 2015

What is the status for this one ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment