Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Java by vladu996 ( 7 years ago )
@Test
 
public void verifyHomePageTitle() {
 
driver.get(baseUrl);
 
        // Find the text input element by its name
 
        WebElement element = driver.findElement(By.name("q"));
 
        // Enter something to search for
 
        element.sendKeys("Cheese!");
 
 
 
        // Now submit the form. WebDriver will find the form for us from the element
 
        element.submit();
 
        // Check the title of the page
 
        System.out.println("Page title is: " + driver.getTitle());
 
        driver.quit();
 
    }

 

Revise this Paste

Your Name: Code Language: