package test.utils;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;

/**
 * Created by ilya on 11/02/2017.
 */
public class Login {
    public static void adminLogin(WebDriver driver, Url url) {
        driver.get(url.toString());
        driver.findElement(By.name("username")).sendKeys("admin");
        driver.findElement(By.name("password")).sendKeys("admin");
        driver.findElement(By.name("login")).click();
    }
}

@@ -246,16 +246,86 @@
 ing());%0A
+        if (driver.findElements(By.id(%22box-login%22)).size() %3E 0) %7B%0A    
         
@@ -375,32 +375,36 @@
 dKeys(%22admin%22);%0A
+    
         driver.f
@@ -454,32 +454,36 @@
 dmin%22);%0A        
+   
+ 
 driver.findEleme
@@ -512,16 +512,26 @@
 lick();%0A
+        %7D%0A
     %7D%0A%7D%0A

improve login method