Get help with testing, discuss unit testing strategies etc.
I have updated Siesta to servion 5.0.0. and have a problem with click event.
After click on some element I get this error:
TypeError: Cannot read property 'document' of null. Here is a smaal part of code:
loginBtn = tExt.ComponentQuery.query('#login')[0]; t.chain(
function(next) {
t.click(loginBtn, callback);
}
)
.
What is wrong in this code?
Last edited by
vakhsakhalyan on Fri Aug 31, 2018 9:35 am, edited 1 time in total.
Hi,
This code is not syntactically correct. You can't place assignment inside the function call.
Sorry, correcting syntax errors is out of the scope of this forum. Please refer to the online JavaScript learning materials.
Yes, Sorry I have updated the code. But the error is become from siesta-all.js
You don't need to make component query separately - Siesta supports it as target locator. See
https://www.bryntum.com/docs/siesta/#!/ ... tionTarget for details.
So the code you posted (it has unknown variable "callback" btw) can be simplified just to:
t.chain(
{ click : '>>#login' }
)
Its not enough information to help you, please provide more details or a reproducible test case.