0

我正在尝试填写如下所示的登录表单,但不起作用

this.remote.get('http://localhost:8000/login')
  .keys('name1') // type on focused username input field
  .keys('\uE004') // press Tab (this doesn't change the focus??)
  .keys('pass') // type password
  .keys('\uE007'); // press Enter to submit

我需要在这里模拟实际用户的操作。

4

1 回答 1

-1

你甚至尝试使用Keys.TAB常量吗?喜欢 :

this.remote.get('http://localhost:8000/login')
  .keys('name1') // type on focused username input field
  .keys(Keys.TAB) // press Tab (this doesn't change the focus??)
  .keys('pass') // type password
  .keys(Keys.ENTER); // press Enter to submit
于 2013-06-25T12:57:58.877 回答