|
package ENSG;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.annotations.*;
import static org.testng.Assert.*;
import com.thoughtworks.selenium.*;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
@Test
public class headerBar {
public void msnlogo() {
WebDriver driver = new FirefoxDriver();
driver.get("http://xin.msn.com/default.aspx");
WebElement headlogo=driver.findElement(By.id("headlogo"));
String width = headlogo.getAttribute("src");
System.out.println(width);
}
} |
|