public class MiSe extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addCookie(Object cookie)
Add a specific cookie.
|
void |
back()
Move back a single "item" in the browser's history.
|
static DriverBuilder |
builder() |
void |
click(String selector)
Click this element.
|
void |
close()
Close the current window, quitting the browser if it's the last window currently open.
|
org.openqa.selenium.WebElement |
findElement(String selector)
Find the first
WebElement using the given method. |
List<org.openqa.selenium.WebElement> |
findElements(String selector)
Find all elements within the current page using the given mechanism.
|
void |
get(String url)
load a new web page in the current browser window.
|
String |
getAttribute(String selector,
String name)
Get the value of the given attribute of the element.
|
Set<org.openqa.selenium.Cookie> |
getCookies()
Get all the cookies for the current domain.
|
String |
getCurrentUrl()
Get a string representing the current URL that the browser is looking at.
|
String |
getPageSource()
Get the source of the last loaded page.
|
String |
getText(String selector)
Get the visible (i.e. not hidden by CSS) text of this element, including sub-elements.
|
String |
getTitle()
The title of the current page.
|
MiSe |
implicitlyWait(int time)
increasing the implicit wait timeout, timeUnit: second
|
boolean |
isDisplayed(String selector)
Is this element displayed or not?
|
boolean |
isEnabled(String selector)
Is the element currently enabled or not?
|
boolean |
isSelected(String selector)
Determine whether or not this element is selected or not.
|
MiSe |
maximize()
Maximizes the current window if it is not already maximized
|
MiSe |
pageLoadTimeout(int time)
wait for page load timeout, timeUnit: second
|
void |
quit()
Quits this driver, closing every associated window.
|
void |
refresh()
Refresh the current page
|
void |
sendKeys(String selector,
String keysToSend)
Use this method to simulate typing into an element, which may set its value.
|
void |
submit(String selector)
If this current element is a form, or an element within a form, then this will be submitted to
the remote server.
|
public static DriverBuilder builder()
public MiSe implicitlyWait(int time)
time - timepublic MiSe pageLoadTimeout(int time)
time - timepublic MiSe maximize()
public void get(String url)
url - The URL to load. It is best to use a fully qualified URLpublic String getCurrentUrl()
public String getTitle()
public org.openqa.selenium.WebElement findElement(String selector)
WebElement using the given method.selector - The locating mechanismpublic List<org.openqa.selenium.WebElement> findElements(String selector)
selector - The locating mechanismWebElements, or an empty list if nothing matchespublic String getPageSource()
public void close()
public void quit()
public void addCookie(Object cookie)
cookie - The cookie to add.public Set<org.openqa.selenium.Cookie> getCookies()
public void refresh()
public void back()
public void click(String selector)
selector - The locating mechanismpublic void submit(String selector)
selector - The locating mechanismorg.openqa.selenium.NoSuchElementException - If the given element is not within a formpublic void sendKeys(String selector, String keysToSend)
selector - The locating mechanismkeysToSend - character sequence to send to the elementIllegalArgumentException - if keysToSend is nullpublic String getAttribute(String selector, String name)
selector - The locating mechanismname - The name of the attribute.public boolean isSelected(String selector)
selector - The locating mechanismpublic boolean isEnabled(String selector)
selector - The locating mechanismpublic String getText(String selector)
selector - The locating mechanismpublic boolean isDisplayed(String selector)
selector - The locating mechanismCopyright © 2019. All rights reserved.