| || |
can I pass an object to method as a parameter.
In QTP I wrote code to pass an object to a method as a parameter:
Web edit object:
If Object.Exists() Then
The above method can work on Edit box, Button and Web Radio BUtton. THis is a generic method which is used to check the existence of any object before we perform some action. Also the error reporting is included in this generic function which makes life easier.
Can I do the same thing in Selenium Web Driver?
I now AsertTrue to verify the existence, but don't know how to pass any object to a GENERIC method.
I don't want to verify the existence on the same function, I want to send, whatever the object, to another generic function which verifies the existence and if the object does not exist write some error report.