Selenium IDE 3.x:Javascript 表达式在什么情况下被评估?
Selenium IDE 3.x: In what context are Javascript expressions evaluated?
是否有关于在 Selenium IDE 3.x 中评估 JavaScript 表达式的上下文的文档?
official documentation只提到Javascript表达式可以在几个命令中使用,但没有说明这些表达式可以包含什么。
- 表达式是否在网页的 JavaScript 上下文中计算?
- 如果是这样,是否有任何隔离措施来防止无意中更改页面内容?
- 是否有任何特定于 Selenium 的 Javascript 功能(即额外的 objects/functions)可用?
https://www.seleniumhq.org/selenium-ide/docs/en/api/commands/#execute-script
Executes a snippet of JavaScript in the context of the currently selected frame or window. The script fragment will be executed as the body of an anonymous function.
是否有关于在 Selenium IDE 3.x 中评估 JavaScript 表达式的上下文的文档? official documentation只提到Javascript表达式可以在几个命令中使用,但没有说明这些表达式可以包含什么。
- 表达式是否在网页的 JavaScript 上下文中计算?
- 如果是这样,是否有任何隔离措施来防止无意中更改页面内容?
- 是否有任何特定于 Selenium 的 Javascript 功能(即额外的 objects/functions)可用?
https://www.seleniumhq.org/selenium-ide/docs/en/api/commands/#execute-script
Executes a snippet of JavaScript in the context of the currently selected frame or window. The script fragment will be executed as the body of an anonymous function.