 ScreenShot661.jpg   21,75К
  19 Количество загрузок:
 ScreenShot661.jpg   21,75К
  19 Количество загрузок:вот этот простой тест выполнялся минуту.
в selenium webdriwer
в селениум иде 20-30 секунд
вот как код выглядит при экспорте
package com.example.tests;
import java.io.File;
import java.util.regex.Pattern;
import java.util.concurrent.TimeUnit;
import org.junit.*;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
import org.openqa.selenium.*;
import org.openqa.selenium.firefox.FirefoxBinary;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.Select;
public class Selentest1 {
	private WebDriver driver;
	private String baseUrl;
	private StringBuffer verificationErrors = new StringBuffer();
	@Before
	public void setUp() throws Exception {
		driver = new FirefoxDriver();
			driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
		}
	@Test
	public void testSelentest1() throws Exception {
		driver.get("http://izhbazar.ru");
		driver.findElement(By.cssSelector("a[title=\"Вход\"]")).click();
		driver.findElement(By.id("password")).clear();
		driver.findElement(By.id("password")).sendKeys("564733");
		driver.findElement(By.id("username")).clear();
		driver.findElement(By.id("username")).sendKeys("квакер");
		driver.findElement(By.name("login")).click();
		driver.findElement(By.cssSelector("dt[title=\"Нет непрочитанных сообщений\"] > a.forumtitle")).click();
		driver.findElement(By.cssSelector("div.post-icon > a > span")).click();
		driver.findElement(By.id("subject")).clear();
		driver.findElement(By.id("subject")).sendKeys("селенийм  тест");
		driver.findElement(By.id("message")).clear();
		driver.findElement(By.id("message")).sendKeys("Общаемся только по телефону,");	
	}
	@After
	public void tearDown() throws Exception {
		driver.quit();
		String verificationErrorString = verificationErrors.toString();
		if (!"".equals(verificationErrorString)) {
			fail(verificationErrorString);
		}
	}
	private boolean isElementPresent(By by) {
		try {
			driver.findElement(by);
			return true;
		} catch (NoSuchElementException e) {
			return false;
		}
	}
}
					
					
 
					
 
				
				
				
