本文整理汇总了PHP中obj::waitForElement方法的典型用法代码示例。如果您正苦于以下问题:PHP obj::waitForElement方法的具体用法?PHP obj::waitForElement怎么用?PHP obj::waitForElement使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类obj
的用法示例。
在下文中一共展示了obj::waitForElement方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _executeSqlAndReturnToTableTracking
/**
* Goes to SQL tab, executes queries, returns to tracking page
*
* @return void
*/
private function _executeSqlAndReturnToTableTracking()
{
$this->byLinkText("SQL")->click();
$this->_helper->waitForElement("byId", "queryfieldscontainer");
$this->_helper->typeInTextArea(
";UPDATE test_table SET val = val + 1; "
. "DELETE FROM test_table WHERE val = 3"
);
$this->byCssSelector("input[value='Go']")->click();
$this->_helper->waitForElement("byClassName", "success");
$ele = $this->byLinkText("More");
$this->moveto($ele);
$this->byLinkText("Tracking")->click();
$this->_helper->waitForElement("byId", "versions");
}
示例2: _doExport
/**
* Function that goes to the import page, uploads a file and submit form
*
* @param string $type level: server, db or import
* @param string $plugin format: csv, json, etc
*
* @return string export string
*/
private function _doExport($type, $plugin)
{
$this->byLinkText("Export")->click();
$this->_helper->waitForElement("byName", "dump");
$this->byCssSelector("label[for=radio_custom_export]")->click();
if ($type == 'server') {
$this->byLinkText('Unselect All')->click();
$this->byCssSelector("option[value=" . $this->_dbname . "]")->click();
}
if ($type == 'table') {
$this->byCssSelector("label[for=radio_allrows_0]")->click();
$this->byName("limit_to")->clear();
$this->byName("limit_to")->value("1");
}
$this->select($this->byId("plugins"))->selectOptionByLabel($plugin);
$this->byCssSelector("label[for=radio_view_as_text]")->click();
if ($plugin == "SQL") {
$this->byCssSelector(
"label[for=radio_sql_structure_or_data_structure_and_data]"
)->click();
if ($type != "table") {
$this->byCssSelector(
"label[for=checkbox_sql_create_database]"
)->click();
}
}
$this->byId("buttonGo")->click();
$text = $this->_helper->waitForElement("byId", "textSQLDUMP")->text();
return $text;
}