blob: e1eda16fe2f2ca72da43520c8745856461a170a9 [file] [log] [blame]
package com.smartcodeltd.jenkinsci.plugins.buildmonitor_acceptance.scenarios.actions;
import org.jvnet.hudson.test.JenkinsRule;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
public class Enter implements Action {
public static Action enter(String what, By where) {
return new Enter(what, where);
}
@Override
public void executeUsing(JenkinsRule jenkins, WebDriver browser) throws Exception {
WebElement element = browser.findElement(where);
element.clear();
element.sendKeys(what);
}
private final String what;
private final By where;
private Enter(String what, By where) {
this.what = what;
this.where = where;
}
}