mutleey Posted June 6 Share Posted June 6 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. Link to comment Share on other sites More sharing options...
bdr529 Posted June 7 Share Posted June 7 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 Link to comment Share on other sites More sharing options...
mutleey Posted June 9 Author Share Posted June 9 Thanks for the answer bdr529, I couldn't read the value with these script lines... I'll keep trying. Link to comment Share on other sites More sharing options...
Danp2 Posted June 9 Share Posted June 9 Post your code showing what you've tried thus far. WebDriver UDF [GH&S] Latest version Wiki FAQs Link to comment Share on other sites More sharing options...
mutleey Posted June 9 Author Share Posted June 9 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) Link to comment Share on other sites More sharing options...
bdr529 Posted June 9 Share Posted June 9 local $text=_WD_ElementAction($sSession, $sElement, 'text') ConsoleWrite("Return: " & $text& @CRLF) To community goes all my regards and thanks Link to comment Share on other sites More sharing options...
Danp2 Posted June 9 Share Posted June 9 @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? WebDriver UDF [GH&S] Latest version Wiki FAQs Link to comment Share on other sites More sharing options...
mutleey Posted June 9 Author Share Posted June 9 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. Link to comment Share on other sites More sharing options...
Danp2 Posted June 10 Share Posted June 10 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. WebDriver UDF [GH&S] Latest version Wiki FAQs Link to comment Share on other sites More sharing options...
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