Saturday, December 15Be an Automation Engineer

Tag: Asynchronous

Execute Asynchronous Javascript in protractor

JavaScript, Javascript Executor, Protractor

Protractor has two functions to execute javascript code in tests.

  • executeScript
  • executeAsyncScript
  • We’ve explained about executeScript with examples here.

    Now, Lets know about executeAsyncScript.

    browser.executeAsyncScript(Asnynchronousjavascript, args…)

    Basically protractor provided this method to execute any asynchronous javascript code. We need to use this method to execute a javascript which has ajax calls or timeouts in it.

    executeAsyncScript takes one » Continue Reading.