Trying to call listener only if entered credentials matched | Selenium Forum
M
Posted on 09/08/2016
Hi,

Please share the logic for

1. Call listener method beforeClickOn() only for perticular click not for all clicks in program
2. how can i compair and only then click on sign in using listener

M
Replied on 09/08/2016

i don't think you understand what listeners are for?

listener are for registering error. so, you can create good reports with relevant info in it.

[quote:1idpw21y]1. Call listener method beforeClickOn() only for perticular click not for all clicks in program[/quote:1idpw21y]
you cannot call listener. but create a method/function that you call before the clicking.

eg
call the function in this line.
click the element in this line.