List of usage examples for org.openqa.selenium By name
public static By name(String name)
From source file:app.Stepdefs.java
@Given("^filename \"([^\"]*)\" is added$") public void filename_is_added(String fileName) throws Throwable { front_page_is_opened();/*from w w w .j a va2s . co m*/ driver.findElement(By.name("fileName")).sendKeys(fileName); }
From source file:app.Stepdefs.java
@When("^printFile button is pressed$") public void printfile_button_is_pressed() throws Throwable { driver.findElement(By.name("fileName")).click(); }
From source file:app.Stepdefs.java
@When("^Search button is pressed$") public void search_button_is_pressed() throws Throwable { driver.findElement(By.name("search")).submit(); }
From source file:app.Stepdefs.java
@When("^a book reference with key \"([^\"]*)\" author \"([^\"]*)\" title \"([^\"]*)\" year \"([^\"]*)\" publisher \"([^\"]*)\" is updated$") public void a_book_reference_with_key_author_title_year_publisher_is_updated(String key, String author, String title, String year, String publisher) throws Throwable { assertTrue(driver.getPageSource().contains("Edit a book reference")); String address = "", series = "", edition = "", month = "", volume = "", tags = ""; updateBook(key, author, title, year, publisher, address, series, edition, month, volume, tags); driver.findElement(By.name("save")).submit(); }
From source file:app.Stepdefs.java
@When("^an article reference with key \"([^\"]*)\" author \"([^\"]*)\" title \"([^\"]*)\" year \"([^\"]*)\" journal \"([^\"]*)\" volume \"([^\"]*)\" tags \"([^\"]*)\" is updated$") public void an_article_reference_with_key_author_title_year_journal_volume_tags_is_updated(String key, String author, String title, String year, String journal, String volume, String tags) throws Throwable { assertTrue(driver.getPageSource().contains("Edit an article reference")); ;/*from w w w .j a va 2s. c o m*/ String publisher = "", number = "", startingPage = "", endingPage = "", month = "", address = ""; updateArticle(key, author, title, year, journal, publisher, volume, number, startingPage, endingPage, month, address, tags); driver.findElement(By.name("save")).submit(); }
From source file:app.Stepdefs.java
@When("^an inproceedings reference with key \"([^\"]*)\" author \"([^\"]*)\" title \"([^\"]*)\" booktitle \"([^\"]*)\" year \"([^\"]*)\" tags \"([^\"]*)\" is updated$") public void an_inproceedings_reference_with_key_author_title_booktitle_year_tags_is_updated(String key, String author, String title, String booktitle, String year, String tags) throws Throwable { assertTrue(driver.getPageSource().contains("Edit an inproceedings reference")); String publisher = "", editor = "", address = "", series = "", startingPage = "", endingPage = "", edition = "", month = "", organization = ""; updateInproceedings(key, author, title, year, publisher, editor, booktitle, address, series, startingPage, endingPage, month, organization, tags); driver.findElement(By.name("save")).submit(); }
From source file:app.Stepdefs.java
@When("^ListAll button is pressed$") public void listall_button_is_pressed() throws Throwable { driver.findElement(By.name("listAll")).click(); }
From source file:app.Stepdefs.java
private void updateBook(String key, String author, String title, String year, String publisher, String address, String series, String edition, String month, String volume, String tags) throws InterruptedException { WebElement element = driver.findElement(By.name("key")); updateField(element, key);/* w w w.j a v a 2 s. c o m*/ element = driver.findElement(By.name("authors")); updateField(element, author); element = driver.findElement(By.name("title")); updateField(element, title); element = driver.findElement(By.name("year")); updateField(element, year); element = driver.findElement(By.name("publisher")); updateField(element, publisher); element = driver.findElement(By.name("address")); updateField(element, address); element = driver.findElement(By.name("series")); updateField(element, series); element = driver.findElement(By.name("edition")); updateField(element, edition); element = driver.findElement(By.name("month")); updateField(element, month); element = driver.findElement(By.name("volume")); updateField(element, volume); element = driver.findElement(By.name("tags")); updateField(element, tags); driver.findElement(By.name("save")).submit(); }
From source file:app.Stepdefs.java
public void updateArticle(String key, String author, String title, String year, String journal, String publisher, String volume, String number, String startingPage, String endingPage, String month, String address, String tags) { WebElement element = driver.findElement(By.name("key")); updateField(element, key);/* www . j av a 2s . c o m*/ element = driver.findElement(By.name("authors")); updateField(element, author); element = driver.findElement(By.name("title")); updateField(element, title); element = driver.findElement(By.name("year")); updateField(element, year); element = driver.findElement(By.name("journal")); updateField(element, journal); element = driver.findElement(By.name("publisher")); updateField(element, publisher); element = driver.findElement(By.name("volume")); updateField(element, volume); element = driver.findElement(By.name("number")); updateField(element, number); element = driver.findElement(By.name("startingPage")); updateField(element, startingPage); element = driver.findElement(By.name("endingPage")); updateField(element, endingPage); element = driver.findElement(By.name("month")); updateField(element, month); element = driver.findElement(By.name("address")); updateField(element, address); element = driver.findElement(By.name("tags")); updateField(element, tags); driver.findElement(By.name("save")).submit(); }
From source file:app.Stepdefs.java
public void updateInproceedings(String key, String author, String title, String year, String publisher, String editor, String booktitle, String address, String series, String startingPage, String endingPage, String month, String organization, String tags) { WebElement element = driver.findElement(By.name("key")); updateField(element, key);/*from ww w.j a v a 2s . c om*/ element = driver.findElement(By.name("authors")); updateField(element, author); element = driver.findElement(By.name("title")); updateField(element, title); element = driver.findElement(By.name("year")); updateField(element, year); element = driver.findElement(By.name("publisher")); updateField(element, publisher); element = driver.findElement(By.name("editor")); updateField(element, editor); element = driver.findElement(By.name("bookTitle")); updateField(element, booktitle); element = driver.findElement(By.name("address")); updateField(element, address); element = driver.findElement(By.name("series")); updateField(element, series); element = driver.findElement(By.name("startingPage")); updateField(element, startingPage); element = driver.findElement(By.name("endingPage")); updateField(element, endingPage); element = driver.findElement(By.name("month")); updateField(element, month); element = driver.findElement(By.name("organization")); updateField(element, organization); element = driver.findElement(By.name("tags")); updateField(element, tags); driver.findElement(By.name("save")).submit(); }