ck81 / tagui

0 stars 0 forks source link

An issue about rpa -- r.keyboard() work in the wrong place #1

Open YuZhouQ opened 1 year ago

YuZhouQ commented 1 year ago

Hi CK! I saw many wonderful answers from you on Kensoh‘s GitHub , so I would like to ask you some questions about RPA. I encountered some problems using Tagui's r. keyboard() function. I wanted it to type [backspace] to delete my input, but instead it deleted the input at the red arrow in the image. I don't know what problem I have encountered. So I am coming to ask for some help. r.init(visual_automation = True) um.go_href('https://m.baidu.com/') r.type('#index-form > div:nth-child(1) > div.con-wrap.new-search-con > div > div.input-wrapper > label','how much') r.keyboard('[ctrl]a') r.keyboard('[backspace]') 67ae884a8e8a8f92544a96d1e4693fd

ck81 commented 1 year ago

Please refer to this post: https://github.com/tebelorg/RPA-Python/issues/466#issuecomment-1534042145

YuZhouQ commented 1 year ago

Hi @ck81: Thank you very much for your detailed response to my question. And I'm sorry for my feedback being too late. As the issue was not resolved at the time, I changed my approach. After reading your answer, I tried again using your method myself. The program ran very smoothly and successfully cleared after entering characters. More importantly, after reading your answer, I truly realized the beauty of xpath. And the differences between Tagui and other RPAs. Meanwhile, what I want to ask is Is there any difference in the use of CSS_selector, xpath, and other element recognition methods? Is it necessary to keep the browser open when recognizing other elements besides xpath? Thank you very much for your detailed answer, which has taught me a lot. I didn't have much understanding of xpath before, and it was only through exposure to rpa that I started to understand its use. I will increase my learning of it. Thank you again, ck!

ck81 commented 1 year ago

Please refer to this post: https://github.com/tebelorg/RPA-Python/issues/466#issuecomment-1576433661