프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$autologin | boolean | If true, {@link loginIfNecessary} is called on {@link setUpSite}. | |
$gitRepository | |||
$testConfig | VersionPress\Tests\Utils\TestConfig | ||
$wpAdminPath | string | ||
$wpAutomation |
메소드 | 설명 | |
---|---|---|
__construct ( $name = null, array $data = [], $dataName = '' ) | ||
setUpBeforeClass ( ) | ||
setUpPage ( ) | ||
setUpSite ( boolean $force ) | Check if site is set up and VersionPress fully activated, and if not, do so. The $force parametr may force this. |
메소드 | 설명 | |
---|---|---|
assertElementExists ( string $cssSelector ) | Asserts that element exists. | |
elementExists ( $cssSelector ) | ||
executeScript ( string $code ) : string | Small wrapper aroung built-in execute() method | |
jsClick ( string $cssSelector ) | Selenium cannot click on hidden things, JavaScript can. Use this method instead of `$this->byCssSelector('. | |
jsClickAndWait ( string $cssSelector ) | Uses {@link jsClick} and waits for AJAX request. | |
logOut ( ) | ||
loginIfNecessary ( ) | ||
setTinyMCEContent ( string $text ) | Types text into TinyMCE. Can be plain text or contain HTML tags. | |
setValue ( $cssSelector, $value ) | The built-in $element->value('xyz') method only appends to an existing value, this method overwrites the whole field. | |
waitAfterRedirect ( integer $timeout = 5000 ) | If there is a redirect after POST (Post/Redirect/Get pattern) you have wait for the shutdown function that creates a commit - the commit may take longer time then rendering new page. | |
waitForAjax ( ) | Wait for all AJAX requests caused by jQuery are done. | |
waitForElement ( string $cssSelector, integer $timeout = 3000 ) | Explicitly wait for the element identified by $cssSelector to appear on the screen (throws assertion error if this element doesn't appear). Note that default Selenium methods have this behavior built-in so you typically only need to call this method at the end of the test method, before the assertions are run (it prevents them from running too soon). | |
waitUntilTrue ( $callback, $timeout = null ) | Selenium API improvement. Wait until callback is true or timeout occurs. |
메소드 | 설명 | |
---|---|---|
staticInitialization ( ) | Makes sure some static properties are initialized. Called from constructor and from static methods that might run before it. |
public __construct ( $name = null, array $data = [], $dataName = '' ) | ||
$data | array |
protected assertElementExists ( string $cssSelector ) | ||
$cssSelector | string |
protected executeScript ( string $code ) : string | ||
$code | string | JavaScript code |
리턴 | string | JS result, if any |
protected jsClickAndWait ( string $cssSelector ) | ||
$cssSelector | string |
protected setTinyMCEContent ( string $text ) | ||
$text | string |
protected setValue ( $cssSelector, $value ) | ||
$cssSelector | ||
$value |
protected waitAfterRedirect ( integer $timeout = 5000 ) | ||
$timeout | integer | Milliseconds |
protected waitForAjax ( ) |
protected waitForElement ( string $cssSelector, integer $timeout = 3000 ) | ||
$cssSelector | string | |
$timeout | integer | Timeout in milliseconds. Default: 3 seconds. |
protected waitUntilTrue ( $callback, $timeout = null ) | ||
$callback | ||
$timeout |
protected static bool $autologin | ||
리턴 | boolean |
protected GitRepository,VersionPress\Git $gitRepository | ||
리턴 |
protected static TestConfig,VersionPress\Tests\Utils $testConfig | ||
리턴 | VersionPress\Tests\Utils\TestConfig |