0

Hope you guys can help me out. Was trying to get inside the hidden element on this website https://cobbca.cobbcounty.org/CitizenAccess/default.aspx using vba selenium however for some reason its not giving me any result.

Was trying to get the text written on this HTML code:

<label id="ctl00_PlaceHolderMain_LoginBox_txtUserId_label_1" for="ctl00_PlaceHolderMain_LoginBox_txtUserId">User Name or E-mail:</label>

I tried this code to get the text out of it:

Debug.Print chrome.FindElementByXPath("//*[@id='ctl00_PlaceHolderMain_LoginBox_txtUserId_label_1']").Text

For some reason it's not giving me any result at all. If you inspect from the website I notice there was some javascript written on the page and makes it hidden for some reason. Is there a way to get out of this?

Even tried using findelementbyID or findelementbyCSS but to no avail.

Hope you can assist me. Thanks in advance

  • It is inside an iframe. .get to the iframe src 'https://cobbca.cobbcounty.org/CitizenAccess/Welcome.aspx' or SwitchTo e.g. .SwitchToFrame – QHarr Aug 25 '20 at 19:04
  • Yeah I noticed that one as well. I tried to get inside the Iframe but won't let me. Do you perhaps have a code or something to get through. At first I thought it won't let me because it's inside the table. I tried using parent and child strategy but still to no avail – Dig Facts Aug 25 '20 at 19:18
  • Just go directly to the url I show above. I tested with python and it works. Don’t have selenium basic set-up but should work in same way. – QHarr Aug 25 '20 at 19:20
  • Didn't notice the link you posted until you mentioned it sorry. Anyway yeah It did work. Thanks a lot bro. so Switchtoframe did the trick indeed. – Dig Facts Aug 25 '20 at 19:32
  • More than welcome. You can directly navigate to the iframe src I showed above if you prefer to .get direct – QHarr Aug 25 '20 at 19:36
  • Yeah I really appreciate it. You're a legend most of your responses from different posts helped me a lot. In fact I already finished my automation because of this. More power to you my friend. – Dig Facts Aug 26 '20 at 20:04
  • you are most welcome – QHarr Aug 26 '20 at 20:09

0 Answers0