+ Reply to Thread
Results 1 to 18 of 18

Internet Explorer Navigation

  1. #1
    Forum Contributor
    Join Date
    09-05-2012
    Location
    It's more fun in the Philippines :D
    MS-Off Ver
    Excel 2007
    Posts
    209

    Internet Explorer Navigation

    Hi experts,

    It's my first time to create a module that will control/navigate an IE.
    Is there any tutorials or examples that I can read/study?

    For example. I want to automatically input my username and password in a mail account.
    I have done it but I want a data validation, how can I determine if the credentials entered were correct?

    Thanks in advance!
    Last edited by thisisgerald; 10-23-2012 at 04:24 AM.
    Don't forget to mark your thread as [SOLVED].

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Internet Explorer Navigation

    It's all a bit of trial and error. You need to try it manually first, look for a what is returned when you enter data incorrectly, then search for it in IE after you've sent the data.

    FWIW Web based email probably isn't the best place to start. Web based email clients like googlemail are incredibly complex, start on easier sites first. Also, learn the DOM http://www.w3schools.com/htmldom/default.asp and HTML http://www.w3schools.com/html/default.asp

    Everything should be fairly straightforward then, the difficult part is always working out how the website works

  3. #3
    Forum Contributor
    Join Date
    09-05-2012
    Location
    It's more fun in the Philippines :D
    MS-Off Ver
    Excel 2007
    Posts
    209

    Re: Internet Explorer Navigation

    Thanks kyle!

    This would be a good start.

    In this:

    It's all a bit of trial and error. You need to try it manually first, look for a what is returned when you enter data incorrectly, then search for it in IE after you've sent the data.
    Do you mean that I should view the page source then compare it to the original one?
    Last edited by thisisgerald; 10-23-2012 at 04:30 AM.

  4. #4
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Internet Explorer Navigation

    Erm, yes and no, not usually the source. It comes back to an email site not being the best thing to learn on since they tend to be fancy and nice to use.

    The source of the page (right click - > View source) is what loads when the page loads, this may however not be the same as the actual page that you're using since JavaScript changes the DOM/HTML of the page once the page has loaded - more data can also be loaded from the server which is commonly what happens when logging in to an email website, the page sends a request to the server and gets the response without reloading the page you are on - This technique is called Ajax and is increasingly more common as it provides a better user experience. These changes aren't reflected in the source of the page, to see them you need to use developer tools, F12 in Chrome and IE to inspect the page as it is, rather than the source of the page when it was loaded.

    So you'd need to hit F12 then in the developer tools find the text which indicates the values are incorrect then check for this in your VBA code.

  5. #5
    Forum Contributor
    Join Date
    09-05-2012
    Location
    It's more fun in the Philippines :D
    MS-Off Ver
    Excel 2007
    Posts
    209

    Re: Internet Explorer Navigation

    Hi Kyle,

    I have experienced coding in PHP before but not that broad and I haven't broaden it. How can I determine in the developer tools which text indicates incorrect values?

  6. #6
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Internet Explorer Navigation

    No Idea I don't know which website you're using.

    I suggest you use chrome, right click on the element and hit inspect element

  7. #7
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    Just look out for things like 'incorrect password or username'.
    If posting code please use code tags, see here.

  8. #8
    Forum Contributor
    Join Date
    09-05-2012
    Location
    It's more fun in the Philippines :D
    MS-Off Ver
    Excel 2007
    Posts
    209

    Re: Internet Explorer Navigation

    My sample site will be gmail.com and I'll be using IE.

  9. #9
    Forum Contributor
    Join Date
    09-05-2012
    Location
    It's more fun in the Philippines :D
    MS-Off Ver
    Excel 2007
    Posts
    209

    Re: Internet Explorer Navigation

    Quote Originally Posted by Norie View Post
    Just look out for things like 'incorrect password or username'.
    That would be on the developer tool of the browser?

  10. #10
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Internet Explorer Navigation

    Yes, on chrome, hover over it, rightclick, inspect element

  11. #11
    Forum Contributor
    Join Date
    09-05-2012
    Location
    It's more fun in the Philippines :D
    MS-Off Ver
    Excel 2007
    Posts
    209

    Re: Internet Explorer Navigation

    Quote Originally Posted by thisisgerald View Post
    Hi Kyle,

    I have experienced coding in PHP before but not that broad and I haven't broaden it. How can I determine in the developer tools which text indicates incorrect values?
    I now know what is inspect element. But I guess I've asked the wrong question above. What I mean is how can I determine if the login was successful or not? Does it have to do something about checking its source code?

  12. #12
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Internet Explorer Navigation

    You can check the location of the page, I believe the location changes when there is a successful logon

  13. #13
    Forum Contributor
    Join Date
    09-05-2012
    Location
    It's more fun in the Philippines :D
    MS-Off Ver
    Excel 2007
    Posts
    209

    Re: Internet Explorer Navigation

    Is the location of the page is the URL?
    Do you have a sample code on how to check?

  14. #14
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Internet Explorer Navigation

    Yes, the URL

    No, but have a look through the Internet Explorer Object, I'm pretty sure there's a location property it might be called LocationURL or something similar

  15. #15
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Internet Explorer Navigation

    If I login to GMail with the incorrect details the browser's URL changes to https://accounts.google.com/ServiceLoginAuth.

    You can get the URL of the current IE document using the URL property.

  16. #16
    Forum Contributor
    Join Date
    09-05-2012
    Location
    It's more fun in the Philippines :D
    MS-Off Ver
    Excel 2007
    Posts
    209

    Re: Internet Explorer Navigation

    @kyle
    That would help a lot. I'll just have to be familiar with the properties.

    Thanks!

    @norie
    Thanks too!

  17. #17
    Forum Contributor
    Join Date
    09-05-2012
    Location
    It's more fun in the Philippines :D
    MS-Off Ver
    Excel 2007
    Posts
    209

    Re: Internet Explorer Navigation

    Hey guys

    I know this is already solved but I just have to ask quick questions.
    How can i click this one?

    Please Login or Register  to view this content.
    thanks!

  18. #18
    Forum Contributor
    Join Date
    09-05-2012
    Location
    It's more fun in the Philippines :D
    MS-Off Ver
    Excel 2007
    Posts
    209

    Re: Internet Explorer Navigation

    Quote Originally Posted by thisisgerald View Post
    Hey guys

    I know this is already solved but I just have to ask quick questions.
    How can i click this one?

    Please Login or Register  to view this content.
    thanks!
    Managed to do it. Used navigate anyway.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1