Selenium 1
lijingshou
这个作者很懒,什么都没留下…
展开
-
关于Selenium脚本在Win7 IE8环境下不能运行的问题及解决方案
运行环境:64位 Win7 professional IE8, 浏览器默认设置Selenium脚本中通过 setUp(url, "iexplore")的方式设置浏览器以java -jar selenium-server.jar不带参数的方式启动selenium server,程序在多窗口的模式下运行.启动任意一个selenium的测试,出现如下[img]http://d...原创 2011-01-30 14:04:47 · 336 阅读 · 0 评论 -
Xpath在selenium中的种种用法
Xpath在selenium中的种种用法原文地址:https://www.simple-talk.com/dotnet/.net-framework/xpath,-css,-dom-and-selenium-the-rosetta-stone/原创 2014-06-20 11:09:32 · 230 阅读 · 0 评论 -
selenium.waitForCondition()的使用
[b]1.selenium.waitForCondition(script, timeoutInMilliseconds);[/b]script为javascript代码,后面为timeout的时间[code="java"]selenium.waitForCondition("selenium.browserbot.getCurrentWindow().***********", ti...2011-03-28 22:55:09 · 597 阅读 · 0 评论 -
使用Selenium操作Iframe
使用selenium.selectFrame("frameId");2011-03-28 18:21:49 · 101 阅读 · 0 评论 -
Selenium应对弹出窗口总结
弹出窗口有如下几种类型[b][*]Https页面弹出窗口[/b]在IE浏览器下,htttps页面会出现Security Alert警告框,以及"Security Information"信息框,在IE中,能通过修改IE设置去屏蔽这两个窗口.如果是Firefox,则可以通过定制Firefox ProfileIE下设置如下:Security Alert: Step1:V...2011-03-13 21:08:20 · 1023 阅读 · 0 评论 -
Selenium工作原理
[url=http://blog.csdn.net/shendl/archive/2009/03/08/3969750.aspx]参考文章地址[/url]Selenium不同于一般的测试工具。一般的脚本测试工具录制脚本,实际上都是通过拦截浏览器收发的http请求来实现的。事实上并没有办法录制用户对html页面的操作。当然,对那些执行压力测试的工具来说,这类模拟已经足够。Se...原创 2011-03-07 16:05:58 · 270 阅读 · 0 评论 -
Selenium元素定位器
[url=http://seleniumhq.org/docs/02_selenium_ide.html#locating-elements]官方原文地址[/url][*]Locating by Identifier[*]Locating by Id[*]Locating by Name[*]Locating by Xpath[*]Locating Hype...原创 2011-03-01 23:37:21 · 246 阅读 · 0 评论 -
使用Selenium测试Flex应用
[b][*]参考链接[/b]Flash Selenium:[url]http://code.google.com/p/flash-selenium/[/url]Flex UI Selenium:[url]http://code.google.com/p/flex-ui-selenium/[/url]Selenium Flex API:[url]http://code.google.co...2011-02-24 19:05:12 · 441 阅读 · 0 评论 -
selenium.click()对checkbox的妙用
首先来看selenium.click()的文档说明:[code="java"]Clicks on a link, button, checkbox or radio button. If the click action causes a new page to load (like a link usually does), call waitForPageToLoad.[/code...2011-02-16 14:14:01 · 668 阅读 · 0 评论 -
Tellurium中关于Container的优化
[b]一.概述[/b]在Tellurium中,所有的页面元素和方法都会写在groovy文件中,一个完整的groovy文件可以是这个样子的,以google首页为例:[code="java"]public class GoogleHomeModule extends DslContext{ public void defineGoogleHomeModule(){ ...原创 2011-01-31 18:27:00 · 102 阅读 · 0 评论 -
对于Selenium元素定位的总结
先来看一段项目中出现过的selenium代码[code="java"]public void setAvailability(){ selenium.click("//td[2]/div/input"); selenium.type("//td[3]/div/input", "23"); selenium.click("//td[4]/...原创 2011-01-31 00:11:17 · 110 阅读 · 0 评论 -
用selenium高效应对Web页面元素刷新
当我们在页面上进行selenium.type()或者selenium.click()操作的时候,往往需要需要等待一个元素的出现,对于一般的网页,当我们进入一个新页面的时候,往往会使用selenium.waitForPageToLoad(WAITTIME);对弹出窗口中的元素,往往写死要等待多少秒,其实可以使用如下更加通用高效的方法,自己写一个waitForElement()的方法:[code=...原创 2011-01-30 14:12:13 · 467 阅读 · 0 评论 -
一个简单的Web UI自动化测试框架Java实现
简介原创文章,转载请注明出处这个框架的名字叫OAT,全称Object-Oriented Automation Test.这个框架的思想借助于Tellurium框架.他的主要功能是将页面信息及行为存储在Java 对象中,然后在脚本中引用页面的行为.自动化程序最终由许多的页面行为组成.这个框架默认使用Selenium1驱动,并且可以通过编程使用其他驱动,因为OAT是面向接口的. ...2013-10-29 01:02:43 · 300 阅读 · 0 评论