View Javadoc

1   package com.atlassian.webdriver.it.pageobjects.page.contenteditable;
2   
3   import com.atlassian.pageobjects.Page;
4   import org.openqa.selenium.WebDriver;
5   import org.openqa.selenium.WebElement;
6   import org.openqa.selenium.support.FindBy;
7   
8   import javax.inject.Inject;
9   
10  /**
11   * TODO: Document this class / interface here
12   *
13   * @since v4.4
14   */
15  public class ContentEditablePage implements Page
16  {
17      @Inject
18      WebDriver driver;
19  
20      @FindBy(name = "iframe-test")
21      WebElement iframe;
22  
23      public String getUrl()
24      {
25          return "/html/contenteditable/content-editable.html";
26      }
27  
28      public WebElement getContentEditable()
29      {
30          driver.switchTo().frame(iframe);
31          return driver.switchTo().activeElement();
32      }
33  
34      public void leaveContentEditable()
35      {
36          driver.switchTo().defaultContent();
37      }
38  
39  
40  }