• Determining whether Google Chrome webpage is loaded

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Determining whether Google Chrome webpage is loaded

    Author
    Topic
    #489940

    Does anyone know how to determine if a web page is loaded via MS Access VBA?
    If so, is it easy enough to determine if a button can be pushed and further select the 2nd of the 2 options it presents?

    Viewing 4 reply threads
    Author
    Replies
    • #1399614

      Does anyone know how to determine if a web page is loaded via MS Access VBA?
      If so, is it easy enough to determine if a button can be pushed and further select the 2nd of the 2 options it presents?

      You can certainly add a Web Browser control to a form, Navigate to a particular url and test to see whether the the navigation has completed. I have to go out for a while, but if no one else replies I’ll see if I can dig out some code later!

      Not sure about testing whether a button “can be pushed” – do you mean finding whether there is a clickable button on the page, or a drop-down list, or something else?

    • #1399627

      Do you have control over the web page? I ask because the way to determine whether an option was chosen in a web page involves Javascript. Probably the best way would be to add javascript to start an ajax action that would result in a change of a database value, and you could check that change from Access…

    • #1399689

      In Access 2010, if I add a Web Browser control to a blank form and leave it with its default name of WebBrowser1, then the following code demonstrates simple page navigation using this control (note: I didn’t have to add any references to the project for this code to compile and run OK):

      Code:
          WebBrowser1.Navigate "www.google.com"
      
          Do Until WebBrowser1.ReadyState = READYSTATE_COMPLETE
              DoEvents
          Loop
      

      In a “real” app you would want some way of dropping out of the Do loop – perhaps if a preset time interval had been exceeded.

      • #1399693

        What I want to do is (via VBA) to go to a particular URL (one of a number of URLs), then click a button on that page (this is literally a drop down box) and click a 2nd option it drops down.
        I don’t need to test for a particular URL as I can fire them using Application.FollowHyperlink, although it would be nice to test if a particular URL was loaded.

        • #1399731

          What I want to do is (via VBA) to go to a particular URL (one of a number of URLs), then click a button on that page (this is literally a drop down box) and click a 2nd option it drops down.
          I don’t need to test for a particular URL as I can fire them using Application.FollowHyperlink, although it would be nice to test if a particular URL was loaded.

          Can you provide a link to one of the URLs in question and an indication of which dropdown box / value is involved, or is this a private site you are accessing?

          I don’t know if what you want to do is possible using VBA, but I’d like to have something to have a look at 🙂

          • #1399738

            I have included a jpg of part of the screen, it is a screen where I trade forex so cannot give you the url for privacy.
            The button is on the RHS labelled Export to Excel.

            • #1399803

              I have included a jpg of part of the screen, it is a screen where I trade forex so cannot give you the url for privacy.
              The button is on the RHS labelled Export to Excel.

              I can’t see any jpg image I’m afraid. I’m out of ideas without a live website to practise on – perhaps someone with more web experience can help out 🙂

            • #1399837

              Here is the url
              http://www.zulutrade.com/trader/163315
              it is no good because it won’t show the button if you are not signed in.
              How do I add a jpg in here?

    • #1399855

      Can you put me onto any documentation that may give me clues on how to do this?

      • #1399921

        Can you put me onto any documentation that may give me clues on how to do this?

        My own knowledge on this is fairly limited I’m afraid – I was hoping that it might be possible to identify the particular page element as you can with Javascript, and somehow manipulate that object to simulate a ‘click’ or ‘select’ action. The relevant body of knowledge is known as the Document Object Model (DOM) for HTML and is typically described in Javascript articles, although you can certainly get at the HTML document property of a web page from VBA using the WebBrowser control I suggested in my earlier post.

        Good luck 🙂

    • #1399945

      Thanks for your efforts, onwards I go

    Viewing 4 reply threads
    Reply To: Determining whether Google Chrome webpage is loaded

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: