selenium - 在 Selenium IDE 3.2.3 Chrome 插件中替代 storeEval 命令

标签 selenium selenium-ide

早些时候,我在 firefox 中使用 Selenium IDE 2.9.1 插件,但由于某些原因,我不得不转向具有 Selenium IDE 3.2.3 插件的 Chrome。

在旧版本中,我使用以下命令来查找测试用例的执行时间:

存储评估 |新日期().getTime(); |开始时间

-- 一些测试用例数据--

存储评估 |新日期().gettime(); |结束时间

存储评估 | (${endTime} - ${startTime})/1000 |脚本执行时间

回声 | ${scriptExecutionTime} 秒 |

但是现在在 Chrome 的新版本中,我找不到 storeEval 命令。 谁能帮我为新的 Chrome 插件编写相同的命令?

最佳答案

迟到总比不到好...:D

你可以使用这个:-

Command        | Target                                     |   Value
execute script | return new Date().getTime()                |   startTime
execute script | return new Date().getTime()                |   endTime
execute script | return (${endTime} - ${startTime}) / 1000  |   scriptExecutionTime

关于selenium - 在 Selenium IDE 3.2.3 Chrome 插件中替代 storeEval 命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51936843/

相关文章:

selenium.windowfocus() 这个命令有什么用?

html - 无法定位带有关键字结尾的输入框 - Xpath

firefox - 无法安装此加载项,因为它似乎已损坏

Java Selenium 无法使用 By.xpath ("//*"找到 DOM 中的所有元素)

java - 无法从 Maven 运行 testNG 测试

python - 将 python selenium 转换为 selenium ide 命令

java - Selenium 测试 Java Maven 依赖关系

selenium - 在 Firefox Selenium IDE 上看不到文件/编辑/操作菜单栏

firefox - selenium DragAndDrop 不拖放,尽管选择器看起来没问题

R 如何在不知道长度的情况下创建 for 循环?