【发布时间】:2011-02-24 06:14:53
【问题描述】:
我有一个使用默认值填充的表单文本字段。我想清除该值并输入空格以断言发生了预期的验证。我正在使用 Selenium RC 和 PHPUnit 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 扩展时不起作用。
【问题讨论】:
标签: selenium phpunit selenium-rc