Вход
package exMail;
import static org.testng.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.*;
import org.openqa.selenium.chrome.ChromeDriver;
import org.testng.Assert;
public class Test_enter {
@Test
public void Enter() {
//System.setProperty("webdriver.chrome.driver", "C:/Users/kate/Downloads/chromedriver_win32 (1)/chromedriver.exe");
ChromeDriver driver = new ChromeDriver();
driver.manage().window().maximize();
driver.get("
http://test/main");
SleepUtil.sleep(9000);
WebElement element = driver.findElementByXPath((".//a[text() = 'Войти']"));
element.click();
SleepUtil.sleep(9000);
WebElement element2 = driver.findElementByXPath(("//input[@placeholder = 'Логин']"));
element2.sendKeys("testlogin", Keys.ENTER);
WebElement element3 = driver.findElementByXPath(("//input[@placeholder = 'Пароль']"));
element3.sendKeys("testpass", Keys.ENTER);