This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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
 
Similar Threads
Problem in selenium.windowMaximize
Problem with creating a file in the current directory and with the current time stamp
Selenium+TestNG+JAVA Test fails on the TearDown method
can't generate JUnit report
Possible error in K&B book (resolved - no error)