摘要
针对Web UI页面频繁更新所带来的自动化测试脚本失效问题,在现有基于DOM树的网页元素定位方法基础上,利用新旧版本Web UI页面DOM树的差异和Selenium IDE录制的旧版测试脚本在新版页面上回放所生成的失效XPath路径对原有方法进行改进,提出一种适应性强、定位准确率高、可用于Web UI自动化测试脚本修复的网页元素重定位方法。实验结果表明,该方法不仅减少了网页元素重定位的运算量,还提高了重定位效率和准确率。
Aiming at the failure of automated test scripts caused by frequent updates of Web UI pages,based on the existing DOM tree based method for locating web elements,this paper uses the differences between the old and new versions of the DOM tree of Web UI pages and the failure XPath path generated by playback of the old version of the test scripts recorded by Selenium IDE on the new version of the page to improve the original method,and puts forward a new method with strong adaptability,high localization accuracy,high a method for relocating web page elements that can be used for repairing Web UI automated test scripts.The experimental results show that this method not only reduces the amount of computation of page element relocation,but also improves the relocation efficiency and accuracy.
作者
陈俊生
彭莉芬
CHEN Jun-sheng;PENG Li-fen(Anhui Vocational College of Electronics&Information Technology,Bengbu 233030,China)
出处
《长春师范大学学报》
2023年第8期54-59,共6页
Journal of Changchun Normal University
基金
安徽省高校自然科学研究重大项目“大数据分析视域下高职校情数据智能分析平台的创新研究与应用”(KJ2021ZD0172)
安徽省质量工程项目“大数据技术教学创新团队”(2021jxtd023)
安徽省教学研究重大项目“基于高阶思维能力培养的全过程混合式教学模式构建与应用研究”(2022jyxm111)
安徽省质量工程项目“示范金课”(2022sfjk005)。