PHP 클래스 Nearsoft\SeleniumClient\WebElement

파일 보기 프로젝트 열기: nearsoft/php-selenium-client

공개 메소드들

메소드 설명
__call ( string $name, array $args ) : mixed Enables setAttribute and getAttribute methods be invoked through method missing.
__construct ( WebDriver $driver, $elementId )
addClass ( string $class )
clear ( ) Clear current element's text
click ( ) Click on element
compareToOther ( WebElement $webElementCompare ) : boolean Test if two element refer to the same DOM element.
describe ( ) : Array Gets element's description
findElement ( By $locator, boolean $polling = false ) : Nearsoft\SeleniumClient\WebElement Find element within current element
findElements ( By $locator, boolean $polling = false ) : Nearsoft\SeleniumClient\WebElement[] Find elements within current element
getAttribute ( String $attributeName ) : String Gets element's specified attribute's value
getCSSProperty ( string $propertyName ) : String Gets element's property CSS
getCoordinates ( ) : Array Get element's coordinates
getElementId ( ) : integer Gets element's id
getElementSize ( ) : array Gets an element's size in pixels
getLocationOnScreenOnceScrolledIntoView ( ) : Array Get element's coordinates after scrolling
getTagName ( ) : String Gets element's tag name
getText ( ) : String Gets element's visible text
hasClass ( string $class )
isDisplayed ( ) : boolean Gets whether element is displayed
isEnabled ( ) : boolean Gets whether element is enabled
isSelected ( ) : boolean Gets whether element is selected
removeClass ( string $class )
sendKeys ( String $text ) Send text to element
setAttribute ( string $attributeName, string $value ) Sets element's specified attribute's value
submit ( ) Submit form from element
waitForElementUntilIsDisplayed ( integer $timeOutSeconds = 5 ) : Nearsoft\SeleniumClient\WebElement Wait for current element to be displayed
waitForElementUntilIsEnabled ( integer $timeOutSeconds = 5 ) : Nearsoft\SeleniumClient\WebElement Wait for current element to be enabled
waitForElementUntilIsPresent ( By $locator, integer $timeOutSeconds = 5 ) : mixed Wait for expected element to be present within current element
waitForElementUntilIsPresentWithSpecificText ( By $locator, String $targetText, integer $timeOutSeconds = 5 ) : Nearsoft\SeleniumClient\WebElement Wait until current element's text equals specified
waitForElementUntilTextIsChanged ( String $targetText, integer $timeOutSeconds = 5 ) : Nearsoft\SeleniumClient\WebElement Wait until current element's text has changed

비공개 메소드들

메소드 설명
getCharArray ( String $text ) : array Returns array of chars from String

메소드 상세

__call() 공개 메소드

The methods should be invoked with the format 'set/get'. Arguments should match those required by setAttribute and getAttribute methods. i.e. setClassName, getInnerHTML, getClassName
public __call ( string $name, array $args ) : mixed
$name string
$args array
리턴 mixed

__construct() 공개 메소드

public __construct ( WebDriver $driver, $elementId )
$driver WebDriver

addClass() 공개 메소드

public addClass ( string $class )
$class string

clear() 공개 메소드

Clear current element's text
public clear ( )

click() 공개 메소드

Click on element
public click ( )

compareToOther() 공개 메소드

Test if two element refer to the same DOM element.
public compareToOther ( WebElement $webElementCompare ) : boolean
$webElementCompare WebElement
리턴 boolean

describe() 공개 메소드

Gets element's description
public describe ( ) : Array
리턴 Array

findElement() 공개 메소드

Find element within current element
public findElement ( By $locator, boolean $polling = false ) : Nearsoft\SeleniumClient\WebElement
$locator By
$polling boolean
리턴 Nearsoft\SeleniumClient\WebElement

findElements() 공개 메소드

Find elements within current element
public findElements ( By $locator, boolean $polling = false ) : Nearsoft\SeleniumClient\WebElement[]
$locator By
$polling boolean
리턴 Nearsoft\SeleniumClient\WebElement[]

getAttribute() 공개 메소드

Gets element's specified attribute's value
public getAttribute ( String $attributeName ) : String
$attributeName String
리턴 String

getCSSProperty() 공개 메소드

Gets element's property CSS
public getCSSProperty ( string $propertyName ) : String
$propertyName string
리턴 String

getCoordinates() 공개 메소드

Get element's coordinates
public getCoordinates ( ) : Array
리턴 Array

getElementId() 공개 메소드

Gets element's id
public getElementId ( ) : integer
리턴 integer

getElementSize() 공개 메소드

Gets an element's size in pixels
public getElementSize ( ) : array
리턴 array

getLocationOnScreenOnceScrolledIntoView() 공개 메소드

Get element's coordinates after scrolling
public getLocationOnScreenOnceScrolledIntoView ( ) : Array
리턴 Array

getTagName() 공개 메소드

Gets element's tag name
public getTagName ( ) : String
리턴 String

getText() 공개 메소드

Gets element's visible text
public getText ( ) : String
리턴 String

hasClass() 공개 메소드

public hasClass ( string $class )
$class string

isDisplayed() 공개 메소드

Gets whether element is displayed
public isDisplayed ( ) : boolean
리턴 boolean

isEnabled() 공개 메소드

Gets whether element is enabled
public isEnabled ( ) : boolean
리턴 boolean

isSelected() 공개 메소드

Gets whether element is selected
public isSelected ( ) : boolean
리턴 boolean

removeClass() 공개 메소드

public removeClass ( string $class )
$class string

sendKeys() 공개 메소드

Send text to element
public sendKeys ( String $text )
$text String

setAttribute() 공개 메소드

Sets element's specified attribute's value
public setAttribute ( string $attributeName, string $value )
$attributeName string The element's attribute name
$value string The value to set the attribute

submit() 공개 메소드

Submit form from element
public submit ( )

waitForElementUntilIsDisplayed() 공개 메소드

Wait for current element to be displayed
public waitForElementUntilIsDisplayed ( integer $timeOutSeconds = 5 ) : Nearsoft\SeleniumClient\WebElement
$timeOutSeconds integer
리턴 Nearsoft\SeleniumClient\WebElement

waitForElementUntilIsEnabled() 공개 메소드

Wait for current element to be enabled
public waitForElementUntilIsEnabled ( integer $timeOutSeconds = 5 ) : Nearsoft\SeleniumClient\WebElement
$timeOutSeconds integer
리턴 Nearsoft\SeleniumClient\WebElement

waitForElementUntilIsPresent() 공개 메소드

Wait for expected element to be present within current element
public waitForElementUntilIsPresent ( By $locator, integer $timeOutSeconds = 5 ) : mixed
$locator By
$timeOutSeconds integer
리턴 mixed

waitForElementUntilIsPresentWithSpecificText() 공개 메소드

Wait until current element's text equals specified
public waitForElementUntilIsPresentWithSpecificText ( By $locator, String $targetText, integer $timeOutSeconds = 5 ) : Nearsoft\SeleniumClient\WebElement
$locator By
$targetText String
$timeOutSeconds integer
리턴 Nearsoft\SeleniumClient\WebElement

waitForElementUntilTextIsChanged() 공개 메소드

Wait until current element's text has changed
public waitForElementUntilTextIsChanged ( String $targetText, integer $timeOutSeconds = 5 ) : Nearsoft\SeleniumClient\WebElement
$targetText String
$timeOutSeconds integer
리턴 Nearsoft\SeleniumClient\WebElement