Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21096

Getting Value/Innertext of HTML with between the words.

$
0
0
Greetings!

I am currently working in an automation to extract data from IE. I have a scenario where two page will be accessed, the first one is the page without username and password on it and the second one is the page with login page to log username and password...

I am currently working on a code where the condition is if the account is logged is as "none" and level as "Administrator", then the page will be accessed and will be directed to the specific url. but when the account is logged in as "none" and level as "Guest", then will be directed to the login page and username and password will be entered.. the problem is the value or the innertext I am extracting has a <br /> between words, how can I set the condition like this?

HTML Code:

<div id="userid">Account: none <br /> Level: ADMINISTRATOR</div>
HTML Code:

<div id="userid">Account: none <br /> Level: GUEST</div>
Code:

If .Document.GetElementById("userid").innertext = "Account: none " & "<br />" & "Level: ADMINISTRATOR" Then
        .Navigate linktesturl
                Do While .Busy: DoEvents: Loop
                Do While .ReadyState < 4: DoEvents: Loop
                .Visible = True

....code continues....

I appreciate your feedback. Thank you. :)

Viewing all articles
Browse latest Browse all 21096

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>