Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 99413

What is the proper location to store helper methods in Cucumber-Java?

$
0
0

I have two methods:

public void openEditUserModal() {
   adminUsersPage.admin_user_table_first_user.click();
}

and

public void waitForUserModal() {
   this.wait.until(ExpectedConditions.visibilityOf(adminUsersPage.admin_user_modal));
}

I initially had these methods as standalone clicks and waits in my step definitions but figured that since they will be reused a lot, it would be good to make helper functions for them.

Is it bad practice to have helper functions in my step definitions file?

Would it be better if I put them in the Page Object file?


Viewing all articles
Browse latest Browse all 99413

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>