Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dom/Xpath can't find element - pending replication, some ideas and maybe it is in a frame? #1423

Open
KennGuo opened this issue Jan 6, 2025 · 8 comments
Labels

Comments

@KennGuo
Copy link

KennGuo commented Jan 6, 2025

Hey~ I want to click on 用户管理 as shown in the picture. I have tried the complete xpath, dom name, relative path xpath, and ID, class,name。 They are all unable to locate the element. I want to know what caused this. May I ask if you can provide some ideas? Thanks a lot!
I trired:
click 用户管理
click //[@id="orgadmin/useradm/index"]/cite
click /html/body/div[1]/div/ul/ul/li/dl/dd[4]/a/cite
click /html/body/div[1]/div/ul/ul/li/dl/dd[4]/a
click //
[@id="orgadmin/useradm/index"]
Snipaste_2025-01-06_14-09-18

@marcelocecin
Copy link

@KennGuo Hi, if your scenario only requires web automation, I suggest testing this platform: https://www.automa.site

@KennGuo
Copy link
Author

KennGuo commented Jan 10, 2025

@KennGuo Hi, if your scenario only requires web automation, I suggest testing this platform: https://www.automa.site

Hey~In fact, I have tried this tool as well as many other RPA tools. I still love the convenience and beauty of TagUI. I hope to focus on TagUI, thank you very much

@marcelocecin
Copy link

Could you share the website or part of the website's HTML?
The automa extension has an element selector that can be useful

@kensoh
Copy link
Member

kensoh commented Jan 15, 2025

Adding on @KennGuo, is there any frame on the webpage? If something is within a frame, will need to use frame() to select the frame first. Thank you so so much for your kind words!

@kensoh
Copy link
Member

kensoh commented Jan 15, 2025

(我也是华人,可能喜欢同样的工具用法。我2017开发TagUI,没想到这路一走就走了八年。)

@kensoh kensoh changed the title Dom/Xpath can't find element Dom/Xpath can't find element - pending replication, some ideas and maybe it is in a frame? Jan 15, 2025
@kensoh kensoh added the query label Jan 15, 2025
@KennGuo
Copy link
Author

KennGuo commented Jan 16, 2025

Hey~I have successfully located it through the following code
frame left_138 // 用户管理 click //*[@id="bgimg"]/div/ul/ul/li/dl/dd[4]
It seems that this is indeed the reason. But I don't understand the techniques of using frames on tagui. Do you have any recommended doc? I'm worried that I won't be able to handle complex situations.
8年走来应该很不容易,但是我觉得您应该也乐在其中。这是一个非常优雅的工具,希望它能持续发展下去,也希望您生活愉快!

@kensoh
Copy link
Member

kensoh commented Feb 4, 2025

Hi @KennGuo for frame, it is here https://tagui.readthedocs.io/en/latest/reference.html#frame

It can support a main frame and one subframe but not more child frames. You can indent the steps to be done under a frame so when you are done don't indent anymore.

@kensoh
Copy link
Member

kensoh commented Feb 4, 2025

Hi @KennGuo 谢谢你的鼓励和支持!!开发这个工具帮我开了很多路。能够在伦敦居住和工作。该走的路总需要走,大家努力创造更好的未来吧!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants