为什么正则表达式在Pywinau中不起作用

2024-06-17 09:05:00 发布

您现在位置:Python中文网/ 问答频道 /正文

from pywinauto import application

app=application.Application()
3. app.connect(title_re = "/Zero Hedge$/")
4. app.connect(title_re = "/| Zero Hedge/")

我想要一个这样的Chrome窗口:http://www.zerohedge.com/news/2016-02-18/markets-ignore-fundamentals-and-chase-headlines-because-they-are-dying

正如您在访问网站时看到的,网站标题的最后部分包含“|零对冲”或仅包含“零对冲”。在

但是,不管是第3行还是第4行,我仍然收到一个WindowNotFoundError。为什么正则表达式不起作用?在

谢谢你的帮助!在


Tags: fromimportreapphttpapplication对冲title