我有一個表單文本字段正在填充默認值。我想清除這個值並輸入空格來聲明預期的驗證發生。我使用Selenium RC和PHPUnit Selenium擴展。我怎樣才能做到這一點?Selenium:如何輸入空格作爲文本字段的值?
注:我已經嘗試做這些,但他們不工作:
$this->type('FirstName', " "); //spaces
$this->type('FirstName', "\t"); //tab character
他們清除字段中的值,但他們沒有進入空白領域進軍。
更新:我發現if you are using Selenium IDE, you can type white space by using their ${space}
variable,但使用Selenium RC和PHPUnit Selenium擴展時,這不起作用。
設置元素的值的語法是什麼? – Andrew 2010-05-26 15:44:01