Calling same method before typical events in Selenium Webdriver -


in selenium webdriver, have call particular method before every "click / submit" event of every method wherever these events appear in class. can invoking same method (to repeated) before each click/ submit event. consider if there total 100 click events in class. cumbersome. instead have give logic , condition call method @ 1 place condition provided click/submit events , subsequently applied before such events.

how can achieve this?

note: statements of click/submit event different.

create parameter customized click/submit method (which may accept locator on want perform action) method want call before click/submit , use customized method in test code.

it onetime task.


Comments

Popular posts from this blog

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -