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

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -