- 0
- 0
- 约1.1万字
- 约 10页
- 2026-09-21 发布于四川
- 举报
选择
在UI自动化测试过程中,经常会遇到一些下拉框。如果我们基于Webdriver操作的话,
就需要点击两次,而且很容易出现问题。
实际上,Selenium给我们了专门的选择模块(下拉框处理模块)。
1从
selenium.webdriver.support.select导入
Select
选择
___
1选择通过索引
#通过索引定位2选择通过
____
值
#通过value值定位3选择通过可见文本
#
通过文本值定位
注意事项:
索引是从0开始;值(value)是option的一个属性值,
并不是显示在下拉框中的值;可见文本(visible_text)是
option中间的值,是显示在下拉框的值。
1
1从
selenium导入
webdriver2从
selenium.webdriver.support.select导入
Select3从
mon.by导入
By4导入
时间
驱动
器
您可能关注的文档
- 微机原理地址译码电路设计实验报告.pdf
- ETH-凝聚体内 PTBP1 与 RNA 的相互作用特征 特异性相互作用在相分离中的作用 Characterization of PTBP1-RNA interactions within condensates – The role of specific interactions in phase separation.pdf
- ETH-探究语篇的信息轮廓 Investigating the Information Contours of Discourse.pdf
- ETH-血清学免疫逃逸与抗体组特征的整合分析 Integrative Profiling of Serological Immune Escape and Repertoire Signatures.pdf
- nber-没有资金支持的任务 2019 年冠状病毒病期间医疗补助持续覆盖要求和州财政负担 An Unfunded Mandate Medicaid Continuous Coverage Requirements and State Fiscal Burdens During COVID-19.pdf
- nber-投资者对股票溢价变化的反应程度和速度 来自财富税的证据 How Much and How Fast Do Investors Respond to Equity Premium Changes Evidence from Wealth Taxation.pdf
- nber-医疗保险家庭健康欺诈:多少、在哪里和谁 Medicare Home Health Fraud How Much, Where, and Who.pdf
- nist-扭曲双层石墨烯中的金属电光效应 Metallic Electrooptic Effect in Twisted Double-Bilayer Graphene.pdf
- escap-乌兹别克斯坦中小企业数字化公共服务的未来三角与因果分层分析 Futures triangle and causal layered analysis of the digital public services for small and medium-sized enterprises in Uzbekistan.pdf
- ecb-两次能源危机的故事 初始条件很重要 A tale of two energy crises – initial conditions matter.pdf
- gao-国防医疗保健 评估民事伙伴关系对准备情况的贡献所需采取的行动 Defense Health Care Actions Needed to Assess Civilian Partnerships’ Contributions to Readiness.pdf
- iai -欧洲芯片法案之外:欧盟产业链对中国、中国台湾地区与美国的依赖现状Beyond the European Chips Act EU Supply Chain Dependencies on China, Taiwan and the United States.pdf
- nist-原子探针层析成像 Atom Probe Tomography.pdf
- nber-多产品生产中的因素偏差与异质产出质量 Factor Bias and Heterogeneous Output Quality in Multiproduct Production.pdf
- nber-频繁程序的贝叶斯批评家 A Bayesian Critic for Frequentist Procedures.pdf
- nber-深度技术创新 迈向概念框架和研究议程的多方法研究 Deep-Tech Innovation A Multi-Method Study toward a Conceptual Framework and Research Agenda.pdf
- nist-离水之钓:钓鱼邮件特征线索大规模研究 Phish Out of Water A Large-Scale Study of Phishing Email Cues.pdf
- nber-数据缺失的价值 The Missing Value of Data.pdf
- ohchr -法官的任命原则 法官和律师独立特别报告员玛格丽特·萨特思韦特的报告 Principles for judicial appointments - Report of the Special Rapporteur on the independence of judges and lawyers.pdf
- OSCAR 面向 2 比特键值缓存量化的离线谱协方差感知旋转变换算法 OSCAR Offline Spectral Covariance-Aware Rotation for 2-bit KV Cache Quantization.pdf
最近下载
- 《通风与空调工程施工质量验收规范》GB50243-2016.docx VIP
- 2020信息化项目建设概(预)算编制办法及计价依据.docx VIP
- 2026中国国新控股有限责任公司校园招聘笔试备考题库及答案解析.docx VIP
- 京东淘宝进军外卖市场万亿级本地生活服务市场竞争格局深度分析.docx
- 某厂房消防施工组织设计.doc VIP
- 资产评估工作底稿(管理类).xls VIP
- 05系列内蒙古建筑标准设计图集05S4消防工程p内蒙古标图集.docx VIP
- 山东省泰安市2017年中考生物真题试题(含解析).pdf VIP
- 农贸市场可行性研究报告.doc VIP
- 20K607防排烟及暖通防火设计审查与安装.pptx VIP
原创力文档

文档评论(0)