如何获取属性content-des的值

获取元素content-desc属性值
本文介绍了一种在自动化测试中获取元素content-desc属性值的方法,通过使用MobileElement的getAttribute方法并传入name参数,可以成功读取到元素的content-desc值,解决了直接使用content-desc作为参数时出现的问题。

有时需要获取元素content-des的值,get element's attribute content-desc(不能直接写content-desc,会报没有此属性,使用name完全可以)

MobileElement.getAttribute("name"); ---成功得到 content-des的值

2025.09.01 16:25:31 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 70 2025.09.01 16:25:31 INFO app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped 2025.09.01 16:25:31 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped 2025.09.01 16:26:51 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory D:\sonarqube-25.8.0.112029\temp 2025.09.01 16:26:51 WARN app[][o.s.a.c.CommandFactoryImpl] ES_JAVA_OPTS is defined but will be ignored. Use properties sonar.search.javaOpts and/or sonar.search.javaAdditionalOpts in sonar.properties to change SQ JVM processes options 2025.09.01 16:26:51 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:{}] 2025.09.01 16:26:51 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [D:\sonarqube-25.8.0.112029\elasticsearch]: C:\Program Files\Java\jdk-17\bin\java -Xms4m -Xmx64m -XX:+UseSerialGC -Dcli.name=server -Dcli.script=./bin/elasticsearch -Dcli.libs=lib/tools/server-cli -Des.path.home=D:\sonarqube-25.8.0.112029\elasticsearch -Des.path.conf=D:\sonarqube-25.8.0.112029\temp\conf\es -Des.distribution.type=tar -cp D:\sonarqube-25.8.0.112029\elasticsearch\lib\*;D:\sonarqube-25.8.0.112029\elasticsearch\lib\cli-launcher\* org.elasticsearch.launcher.CliToolLauncher 2025.09.01 16:26:51 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running 2025.09.01 16:26:52 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 70 2025.09.01 16:26:52 INFO app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped 2025.09.01 16:26:52 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped C:\Windows\System32>管理员是这个路径
最新发布
09-02
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值