WinAppDriver icon indicating copy to clipboard operation
WinAppDriver copied to clipboard

can not getText()

Open gotitgit opened this issue 1 year ago • 1 comments

I want gettext but can not

i tried text = winapp.findElementByClassName("Label").getText(); System.out.println(text); but result "nid.naver.com의 메시지"

how to get text? can i use processid?

What are some more element values I can try here? Or should I ask the developer to add an element?

image

image

gotitgit avatar Oct 17 '23 09:10 gotitgit

You are using it correctly, but there can be many Labels, So I would suggest to create a more complex Xpath and then find it from that and get its text. Also the text should appear in the value field in the win app driver then only you can get the text, if you cant see it in value then try saving the application and then try to find it.

RakeshDangi-slt avatar Dec 27 '23 12:12 RakeshDangi-slt