openatx/facebook-wda

How to convert wda.Element Object to wda.Selector Object ?

Open

#93 创建于 2020年2月16日

在 GitHub 查看
 (2 评论) (0 反应) (0 负责人)Python (257 fork)batch import
help wanted

仓库指标

Star
 (1,624 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

Hi,I am a new learner to be here to learn how to use facebook-wda. Now I met a problem. The problem is when i use "elements =s(text='Dashboard').find_elements()" to get "Array of Element object",But i use "elements[0]" to call click() method like this "elements[0].click()". Because it's Element object. But we can use "element=s(type="Dashboard", textContains="房间")[0]" to call click() method like this "element.click()". Because it's Selector object. How to convert wda.Element Object to wda.Selector Object each other?

贡献者指南