PDA

Click to See Complete Forum and Search --> : Automated functional testing with WebDriver and jUnit


StrangerInBeijing
Nov 4th, 2009, 09:53 AM
Being new to Java and all that, I got the hang of jUnit to create unit test for code, and today nutted out to work with webdriver for functional tests.

Was wondering if one can use jUnit for asserting the results of webdriver test results?

Did not look (it's late......kinda last minute thought before hitting the sack), but create a normal jUnit test suite, use webdriver to run tests on the UI, and assert the results with jUnit. Something like that?

If one can do this, did anyone do it? Some simple sample perhaps if you did?

Only "promising" link I got from google seems to be in some blog which seems to be blocked here (China....what's new?)

StrangerInBeijing
Nov 5th, 2009, 12:56 AM
Pretty simple it turned out:
@Test
public void SomeTest() {

WebDriver driver = new FirefoxDriver();
driver.get("https://xxx.xxx.xxx.xxx:8081");
assertEquals("Log on", driver.getTitle());

}

Now I'm stuck with the windows authenticated login that pops up. This is a team build site, from there it got authentication on it now.

StrangerInBeijing
Nov 12th, 2009, 07:04 AM
Hey!
Anyone here use WebDriver at all?

Need some help with PageFactories.