vendredi 26 mai 2017

Nightwatch.js assert console warning

I'm really new to nightwatch and automating tests so maybe my question makes no sense for the Pro's here :)! But i thought before I continued to search the whole internet (yes i google it already) let's ask you guys if this is even possible.

I'm facing the situation to automate tests where i have to check multiple pages about localization of words in multiple languages. In the code are placeholder for words if they have to be displayed in different languages depending on some conditions. Those placeholders gets configured in an external tool and changes sometimes. Without going too deeply into detail i worked on a possible solution with our Dev's and the actual situation leads us to only one way. If there is a configuration missing in the external tool and don't display the word on our page it throws a console warning with a specific message.

Now my Question is if it's possible to check in a nightwatch test if this warning is present in the console or not and accordingly pass oder fail the testcase?

I already found a way to print out the console warning in a test but maybe there is a better way to get this test done.

And at least, no i cannot share the code because i don't have the permission to share our code :)

Already thanks for your feedback & cheers Umberto

Aucun commentaire:

Enregistrer un commentaire