mutleey Posted June 6, 2023 Posted June 6, 2023 Hello friends, I have a problem and I hope that the dear colleagues can help me, I need to read the information marked in the print in the chrome code.
bdr529 Posted June 7, 2023 Posted June 7, 2023 local $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@color='secondary' and @font-size='16px' and @class='sc-daa4d312-0 sc-91c0326-1 1-pocKL ezfAXw']") local $text=_WD_ElementAction($sSession, $sElement, 'text') To community goes all my regards and thanks
mutleey Posted June 9, 2023 Author Posted June 9, 2023 Thanks for the answer bdr529, I couldn't read the value with these script lines... I'll keep trying.
Danp2 Posted June 9, 2023 Posted June 9, 2023 Post your code showing what you've tried thus far. Latest Webdriver UDF Release Webdriver Wiki FAQs
mutleey Posted June 9, 2023 Author Posted June 9, 2023 The return is always blank, the value I need is the clock marked in the image, every 1sec. The website is pancakeswap #include "wd_core.au3" ; https://pancakeswap.finance/prediction Local $sSession = _WD_CreateSession() Local $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@color='secondary' and @font-size='16px' and @class='sc-daa4d312-0 sc-91c0326-1 lpocKL ezfAXw']") ConsoleWrite("Return: " & $sElement & @CRLF)
bdr529 Posted June 9, 2023 Posted June 9, 2023 local $text=_WD_ElementAction($sSession, $sElement, 'text') ConsoleWrite("Return: " & $text& @CRLF) To community goes all my regards and thanks
Danp2 Posted June 9, 2023 Posted June 9, 2023 @mutleey That script doesn't even navigate to the website, so it isn't surprising that it can't find the element, 🙄 Is there a reason that you can't post an actual reproducer? Latest Webdriver UDF Release Webdriver Wiki FAQs
mutleey Posted June 9, 2023 Author Posted June 9, 2023 Danp2 has no real code because I don't even know where to start, the most I have is snippets that I was looking for in the forum to test but none of them worked. There is nothing objective about getting this information from the website, I just decided to get this value because it is an interesting excerpt. Any help will be welcome! bdr529 I couldn't get these lines to work.
Danp2 Posted June 10, 2023 Posted June 10, 2023 I'm happy to help, but first you'll need to show some reasonable effort on your part. Just stating that something doesn't work without showing the context in which you tried to use it isn't useful IMO. Latest Webdriver UDF Release Webdriver Wiki FAQs
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now