当前位置:编程学习 > JAVA >>

有关Selenium 自动化测试,回放之前录制的脚本,在IE和firefox中时间差异

--------------------编程问答-------------------- --------------------编程问答-------------------- 1.Optimization Xpath:

a.In the IE it is slow to run XPath,so ‘JavaScript-XPath’ can be used to replace the default xpath library.

       b. When xpath is needed, as far as possible from a the id of the element, can also greatly improve the speed of execution.

2.XPath extremely inefficient in IE.It is also suggest that use Dom locator and CSS locator supports IE browser where it is appropriate.

a.For complex objects (not containing ID and Name of the dynamic object) Dom locator flexible than xpath locator in IE script execution efficiency and a much shorter time than when using Xpath.

b.When more use of CSS page in Internet Explorer and Firefox browsers, use CSS locator instead of xpath locator.

Reference material:

http://blog.csdn.net/fhnp1983/article/details/6908749

http://blog.csdn.net/fhnp1983/article/details/6908745

http://blog.csdn.net/fhnp1983/article/details/6908741

--------------------编程问答-------------------- 如上得到了很好的改善。
补充:Java ,  Web 开发
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,