Module 1.3 - Selenium IDE - Convert to JUnit

From Training Material
Jump to navigation Jump to search
package com.example.tests;

import com.thoughtworks.selenium.*;
import java.util.regex.Pattern;

public class exercise2 extends SeleneseTestCase {
	public void setUp() throws Exception {
		setUp("http://www.google.co.uk/", "*chrome");
	}
	public void testExercise2() throws Exception {
		selenium.open("");
		selenium.waitForPageToLoad("");
		selenium.type("id=gbqfq", "Noble prog ltd");
		selenium.keyPress("id=gbqfq", "\\13");
		selenium.waitForPageToLoad("");
		selenium.click("link=NobleProg - Training Courses and Consultancy | NobleProg");
		assertNotEquals("", selenium.getTitle());
	}
}