openatx/facebook-wda

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

Aperta

#93 aperta il 16 feb 2020

 (2 commenti) (0 reazioni) (0 assegnatari)Python (257 fork)batch import
help wanted

Metriche repository

Star
 (1624 stelle)
Metriche merge PR
 (Merge medio 2m) (1 PR mergiata in 30 g)

Descrizione

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?

Guida contributor