当前位置:网站首页>executeScript异步执行的时候没有返回值的原因
executeScript异步执行的时候没有返回值的原因
2022-08-02 16:45:00 【安卓世界库】
异步执行,函数执行完看,但是里面的值系统还在没有赋值完毕,所以返回值的时候总是空或者没有内容。此时应该让线程等待一会。
例子:
JavascriptExecutor jsdriver=(JavascriptExecutor)cmdriver;
jsdriver.executeScript(sjs);
String yx = "return ygid(\"sdsd\")";
jsdriver.executeScript(yx);
Thread.sleep(5000);//等待一段时间,然后提取内容
yx = "return ygtn()";
//String s = x.toString();
System.out.println(jsdriver.executeScript(yx));
边栏推荐
- Antd-ProComponents中的EditableProTable无法在子行继续新增子子行的临时解决方案
- Smart Contract Security - delegatecall (1)
- Oracle 11 g rac finished patch, dbca new patches of SQL database also needs to perform?
- 【二】通过props进行传值,子页面多种方式接收
- SQL Statement Basics
- Gartner发布,年度Challenger!
- 链表的归并排序[自顶向下分治 || 自低向上合并]
- Red and blue against experience sharing: CS from kill posture
- 一文搞懂│php 中的 DI 依赖注入
- 使用 LaunchPad 上的 TAO 工具包体验轻松创建 AI 模型
猜你喜欢

Mysql——分组统计
![[300+ selected big factory interview questions continue to share] Big data operation and maintenance sharp knife interview questions column (10)](/img/cf/44b3983dd5d5f7b92d90d918215908.png)
[300+ selected big factory interview questions continue to share] Big data operation and maintenance sharp knife interview questions column (10)

智能合约安全——delegatecall (1)

金仓数据库 OCCI 迁移指南(4. KingbaseES 的 OCCI 迁移指南)

MYSQL下载及安装完整教程

Pytest study notes

持续集成(四)Jenkins配置报警机制

Five speakers: seventy genius_platform software platform development 】 【 turn YUY2 RGB24 implementation source code

Coordinate knowledge in digital twin campus scenarios

npm install报gyp info it worked if it ends with ok
随机推荐
图像质量评价指标
什么是APS系统?导入APS要注意什么?值得反复观看
更舒适更安全更时尚 凯翼2023款炫界正式上市
In the idea to create a web project _idea deployment of the web project
jar包应用的简单启停脚本
Smart Contract Security - delegatecall (1)
链表的归并排序[自顶向下分治 || 自低向上合并]
Gartner发布,年度Challenger!
金仓数据库 OCCI 迁移指南(4. KingbaseES 的 OCCI 迁移指南)
Mysql开启binlog
CNN经典模型汇总[通俗易懂]
实时数仓架构演进及选型
Redis进阶之路:深度解析Redis单线程架构,图文并茂不能再清晰了
Continuous integration (4) Jenkins configuration alarm mechanism
Oracle 11g rac打完补丁,dbca新建数据库还需要执行应用补丁的sql吗?
julia系列1:介绍与安装
【300+精选大厂面试题持续分享】大数据运维尖刀面试题专栏(十)
几种常见的跨域解决方法
Flink SQL搭建实时数仓DWD层
Antd-ProComponents中的EditableProTable无法在子行继续新增子子行的临时解决方案