zombie icon indicating copy to clipboard operation
zombie copied to clipboard

Error when clicking on Button with OnClick Event

Open PritikaRaghoji opened this issue 8 years ago • 1 comments

Hi All,

I am new to Zombiejs and need help for resolving following issue.

I am getting following error when I try to click on Button with OnClick Event, Please help me resolve this.

Error : Unhandled rejection javascript::1 WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$MainHolder$Search$SearchLBTN", "", true, "FilterSearchGroup", "", false, true)) ^

ReferenceError: WebForm_DoPostBackWithOptions is not defined at javascript::1:1 at ContextifyScript.Script.runInContext (vm.js:59:29) at Object.runInContext (vm.js:120:6) at window._evaluate (/Users/ABC/Documents/ABC/Repo/sampleZombie/node_modules/zombie/lib/document.js:284:75) at /Users/ABC/Documents/ABC/Repo/sampleZombie/node_modules/zombie/lib/document.js:882:16 at Immediate. (/Users/ABC/Documents/ABC/Repo/sampleZombie/node_modules/zombie/lib/eventloop.js:676:13) at runCallback (timers.js:789:20) at tryOnImmediate (timers.js:751:5) at processImmediate [as _immediateCallback] (timers.js:722:5)

Page Details: screen shot 2018-03-19 at 4 20 09 pm

Sample Code: browser.click('#ctl00_MainHolder_Search_SearchLBTN').then(function(){ browser.check('#ctl00_MainHolder_ExplorerCtl_ExplorerGrid_ctl03_SelectRowCB').then(function(){ browser.pressButton('#ctl00_MainHolder_Delete').then(function(){ browser.pressButton('#ctl00_MainHolder_mdDeleteReports_btnDeleteReports').then(function(){ browser.assert.text('title','test'); }) }) }) })

PritikaRaghoji avatar Mar 19 '18 05:03 PritikaRaghoji

I hope you was able to solve your issue in the meantime. If this is the case. please comment short, how you solved your problem and close the issue.

Your issue does not look to be an Zombie issue, as a call of your application functon as one part of the correct called onclick handler fails.

Just have a look at the html source e.g. by console.log(browser.html()) and check if all functions are defined, and all additional loaded packages can be found by zombie.

TheFive avatar Oct 27 '18 16:10 TheFive