python+selenium处理Alert弹窗时报错:TypeError: ‘Alert‘ object is not callable解决方法

报错如下:
在这里插入图片描述

原因分析:
‘Alert’ object is not callable 的含义为Alert不能被函数调用,它不是一个函数。
解决方法:
将Alert后的括号去掉
正确代码如下:
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/Aihu202/article/details/108304484
今日推荐