Jatin
Jatin

Reputation: 670

How to call the common test case in other test case in protractor

I am testing my web application using protractor and have around 30 test cases with me. I have a common test case where I check the version of the website which i fetch from the html manifest attribute. I can use this and every test case but i want to know is there a way where i can create test spec file with only one test case to check the version of the file and this spec file is used by all other specs file?

Please provide your valuable knowledge to me.

Upvotes: 1

Views: 438

Answers (1)

AdityaReddy
AdityaReddy

Reputation: 3645

If i understand what you meant correctly, I guess you are looking for creating a re-usable utility which will fetch some attribute value and you want to call this re-usable method from other test cases.

You can refer Page Object Model - and Creating re-usable methods

Upvotes: 1

Related Questions