本文介绍了如何在Selenium IDE中为Web目标选择正确的操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Selenium IDE的新手。据我所知,当打开Selenium IDE时,你会注意到红色的记录宏按钮被切换。这意味着硒会尝试记录您在浏览器中进行的每一个操作。这是一个有问题的记录方式,因为我们在继续之前隐含地等待动作完成。



如果我只让Selenium记录每个动作而不指定额外动作,步骤将失败,并显示错误消息:找不到元素。我正在尝试添加基于Selenium API的额外操作,如waitForElementPresent,waitForSearch等。



我的问题是:如何知道需要添加哪些额外操作每个网络目标?它的任何标准?谢谢!

您可能想试试。它会在对该元素执行操作之前自动调用WaitForElementPresent(如点击)。这可以为你节省一些时间。


I am new to Selenium IDE. As far as I know, when open Selenium IDE, you will notice that the red 'record macro' button is toggled. This means that selenium will attempt to record every action you make inside the browser. This is a problematic way of recording as we implicitly wait for actions to complete before moving on.

If I only let Selenium to record every actions without specifying extra actions, many test step will be failed with error message : Element not found. I was trying to add extra actions based on Selenium API, like waitForElementPresent, waitForSearch etc.

My question is: How do I know which extra action do I need to add for each web target? Any standard for it? Thanks!

解决方案

You may want to try Implicit Wait addon for Selenium IDE. It will automatically call WaitForElementPresent before executing actions on that element (like clicks). This may save you some time.

这篇关于如何在Selenium IDE中为Web目标选择正确的操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-01 10:37