aspose file tools*
The moose likes Testing and the fly likes Webdriver extends helperclass to assert Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Webdriver extends helperclass to assert" Watch "Webdriver extends helperclass to assert" New topic
Author

Webdriver extends helperclass to assert

Albert Park
Greenhorn

Joined: Feb 01, 2012
Posts: 28
Hello, if this is a wrong section in the forum I apologize.
I am learning java and in the mean time learning about selenium webdriver, so bear with me.
I am playing with selenium webdriver to see if I can use it to test simple web browser.
However, I ran into a problem when I try to build a sample class that extends to super class to help me simplify things.
For example, verifying element present.



here is part of my subclass that actually runs the test.



So verifyLink method doesn't work correctly and always shows test passed.
So I know this way is making me use the driver in superclass and my subclass won't even throw an error when the test runs.
I want to make it so my subclass inherits the methods that I need, and use my own Webdriver object that is from subclass to make the test fail, when it should.
Can someone guide me to the correct design of creating a helper class.

Thanks in advance.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Webdriver extends helperclass to assert