I am trying to run a L2 test for WebUI in that I am trying to check whether two values are equal or not. So I am using casper.test.assertEquals and I have seen that one of the values is NULL in the logs and the steps after this assert are not getting executed as we are not getting any logs after this assert and the test as a total is passing. It is not even logging the asssertEquals log.
Below is the log for the test case
CASPERJS> Page error: "TypeError: undefined is not an object (evaluating 'TextBoxf.value')" CASPERJS> # Expected title: be80729f-b76b-45c6-b49b-42756c7b2f48 actual title: null CASPERJS> all promises settled
Below is the test code:
casper.test.comment("Expected title: " + expectedTitle + " actual title: " + actualTitle); casper.test.assertEquals(expectedTitle, actualTitle);
as shown in above log the actual title is null but the assert doesn’t fail and exits from the test case with out executing the remaining test code and says all promises settled. Is this because of the null value of one of the variables?
Any clue why is this happening like this?
Thank You.
Aucun commentaire:
Enregistrer un commentaire