I regularly navigate an intranet website that opens a second window after clicking a link on the first. I would like to change the value of a "textarea" element in the second window but have problems focusing on the correct window. Are there any suggestions on how I should continue the following code to achieve what I want to do?
IE.Navigate webPageURL
PageLoadWait 'sub that checks IE.busy and IE.readystate
With IE.Document.Frames("topFrame").document
.getElementById("user")=userID
.getElementById("pwd")=password
.getElementById("submit"). Click
End With
PageLoadWait 'Second window opened
I looked at the question below but am not sure how I would be able to adapt it to my needs since window title is the same for both windows. I tried matching window URL since they are slightly different but was unable to succeed for some reason.
VBA code to interact with specific IE window that is already open