CaptainBeardsEyesBeard Posted January 25, 2021 Share Posted January 25, 2021 (edited) Hi guys I'm trying to get this value where when you hover on insuredname you get the greyed out text of _InsuredName_CCC If you hover over insured name you get the greyed out box appear. An inspect of the element looks like this I tried trying to get this value using the below but the msgboxs don't return anything (except the value one which correctly returns "insured Name" $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, '//*[@id="mat-input-16"]') $ClipData = _WD_ElementAction($sSession, $sElement, 'property', 'innerText') ; Msgbox(64, "", "$ClipData equals inner text: " & $ClipData) $ClipData = _WD_ElementAction($sSession, $sElement, 'property', 'value') ; Msgbox(64, "", "$ClipData equals value: " & $ClipData) $ClipData = _WD_ElementAction($sSession, $sElement, 'property', 'attribute') ; Msgbox(64, "", "$ClipData equals value: " & $ClipData) $ClipData = _WD_ElementAction($sSession, $sElement, 'property', 'property') Msgbox(64, "", "$ClipData equals value: " & $ClipData) $ClipData = _WD_ElementAction($sSession, $sElement, 'property', 'css') ;; Msgbox(64, "", "$ClipData equals value: " & $ClipData) _WD_ElementActionEx($sSession, $sElement, "hover") Sleep(500) $HoverElement = _WD_GetMouseElement($sSession) MsgBox(64, "", "Hover element equals:" & $HoverElement) So am I using hover incorrectly? As SCITE output seems to point to a success and returning the $HoverElement variable _WD_ElementActionEx ==> Success __WD_Post: URL=HTTP://127.0.0.1:9515/session/ceaea31d471dae4572480bc7d1eabb97/execute/sync; $sData={"script":"return Array.from(document.querySelectorAll(':hover')).pop()", "args":[]} __WD_Post: StatusCode=200; ResponseText={"value":{"element-6066-11e4-a52e-4f735466cecf":"e47ad604-5fbd-4f2c-a295-483d35d5c635"}}... _WD_ExecuteScript: {"value":{"element-6066-11e4-a52e-4f735466cecf":"e47ad604-5fbd-4f2c-a295-483d35d5c635"}}... _WD_GetMouseElement: e47ad604-5fbd-4f2c-a295-483d35d5c635 _WD_GetMouseElement: 0 Edited January 25, 2021 by CaptainBeardsEyesBeard Link to comment Share on other sites More sharing options...
Danp2 Posted January 25, 2021 Share Posted January 25, 2021 Not sure that I understand exactly what you are wanting to do here. Have you compared the element returned by _WD_GetMouseElement to the one from _WD_FindElement? My general suggestion on this kind of situation is to use the console in the browser's Developer Tools to determine how you can programmatically obtain the desired information. Once you know how to do that, then implement it in Autoit with the necessary webdriver calls. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
CaptainBeardsEyesBeard Posted January 25, 2021 Author Share Posted January 25, 2021 (edited) So...When you hover on the text box that contains "Insured Name" you get the graybox appearing that displays "_InsuredName_CCC" I was trying to figure out how to get the value of the hover item "_InsuredName_CCC" Edited January 25, 2021 by CaptainBeardsEyesBeard Link to comment Share on other sites More sharing options...
Danp2 Posted January 26, 2021 Share Posted January 26, 2021 Does the "greyed out box" appear after this call to _WD_ElementActionEx? If so, then you need to determine the underlying HTML for that element so that you can access it. If not, then I'll refer you back to the 2nd part of my earlier post. Latest Webdriver UDF Release Webdriver 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