WebDriver C# extension methods in Java -


in c# write extension methods add functionalities iwebdriver , iwebelement.

example:

public static iwebelement clearandsendkeys(this iwebelement e, string text) {     e.clear();     e.sendkeys(text); } 

i use later this:

txtusername.clearandsendkeys("user123"); 

i've changed job , in new company writing tests in java. far have been banging head against wall trying figure out best way @ least close doing in c#. suggestions?

java not support extension methods, period. can create static methods instead:

clearandsendkeys(txtusername, "user123"); 

(using static method imports)


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -