0

I been trying to adapt code to get this working but with no success. I need to submit as guest the following webpage:

<div class="lotusBtnContainer">
<input type="submit" class="lotusBtn" value="Access as a Guest"onclick="javascript:asGuest();">
<input type="submit" class="lotusBtn" value="Log in and Access" onclick="javascript:asUser();">
<span class="lotusAction"> &nbsp;</span>
</div>

This is what I have so far, since the button doesn't have an ID I'm not sure how to address it:

Dim IntExpl As Object
Set IntExpl = CreateObject("InternetExplorer.Application")
With IntExpl
      .navigate "webpage url"
      .Visible = True
      Do Until IntExpl.readyState = 4
Loop
    '.document.getElementsByName("subAction")(0).Click
End With
End Sub
1
  • 1. The first thing I notice is that you should be using .getElementsByTagName (note the 'Tag'). 2. The next thing I note is that you should be trying to click .document.getElementsByTagName("input")(0) Commented Aug 18, 2014 at 9:07

1 Answer 1

1

This worked.

Dim IntExpl As Object

    Set IntExpl = CreateObject("InternetExplorer.Application")


    With IntExpl
          .navigate "https://febontap.victoria.ibm.com/forms/anon/org/notify/guestselection.html?originatingUrl=..%2f..%2f..%2flanding%2forg%2fapp%2ff373ed45-3637-4662-8fb8-a40a0bd621db%2flaunch%2findex.html%3fform%3dF_Form1&guest=..%2fapp%2ff373ed45-3637-4662-8fb8-a40a0bd621db%2flaunch%2findex.html%3fform%3dF_Form1&user=..%2f..%2f..%2fsecure%2forg%2fapp%2ff373ed45-3637-4662-8fb8-a40a0bd621db%2flaunch%2findex.html%3fform%3dF_Form1"
          .Visible = True
          Do Until IntExpl.readyState = 4
    Loop


    .document.getElementsByClassName("lotusBtn")(0).Click



    End With
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.