开发者

Detecting selenium commands

Is there anyway I can detect selenium commands so I can't automatically insert a screenshot command after each one? I would like to keep this in Javascript as I am using the html testscripts. Example:

clickandwait | element | <-- is there a way to know via Javascrip开发者_运维百科t that this was fired so I add

captureentirepagescreenshot | c:\screenshots.jpg | after it.


Do you want to take screenshots only if a prticular element is present on page? If yes, then in Selenium-RC the code will be

if(selenium.isElementPresent("yourElement")){
selenium.captureEntirePageScreenshot("c:\screenshots.jpg", "") }

You can try isElementPresent in Selenium-IDE. I haven't tried this one though, so not sure about it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜