This code, i am running in my page class
I.fillField ("input[@class='test']", "name");
}
catch(error){
console.log("Error is occured");
I.refreshPage();
}
If script is unable to fill the text in textbox. instead of failing the case,.. it go to catch section.. refresh the page
This code is working .. but problem it after execution of catch block .. test got failed instead of continue the execution
I have also tried some solutions present on some forms like mentioned below. but facing same issue
I.fillField ("input[@class='test']", "name").catch((error)=>{
I.say("Error is occured");
I.say(error);
I.refreshPage();
});
Can anyone help me to implement try catch block in codeceptjs