当您手动按下键盘上的 Ctrl+Alt+Delete 键时,您将删除所有 Cookie。
我使用 Selenium IDE,在我的脚本中,我想通过模拟按 Ctrl+Alt+Delete 来自动删除 cookie,但我不知道执行此操作的命令、目标和值是什么。
我不想使用 deleteCookie
命令,例如...
<tr>
<td>deleteCookie</td>
<td>__utmz</td>
<td>path=/21910987/, domain=24hmontreal.canoe.ca, recurse=true</td>
</tr>
最佳答案
我猜你的意思是Ctrl+Shift+Delete,对吗?
根据the reference ,您需要调用
controlKeyDown()
shiftKeyDown()
keyPress("dom:document.body", "\127")
//127 是删除的 ASCII 代码
shiftKeyUp()
controlKeyUp()
关于Selenium ide-如何模拟按键ctrl-shift-delete来删除cookie?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11495273/