Jump to content

IE - Set focus to new page


Recommended Posts

Hi,

I'm new to the whole Autoit and i've hit abit of a stump. I'm trying to automate a process that will:

- Open a new window and go to the login page (DONE)
- Use my details and log me in (DONE)
- Navigate through the website, clicking hyperlinks and present me with the upload page (DONE)
- Fill in details on page and then click submit

The issue i have is that the upload page opens as a popup. How do i set focus to this new page so that i can use functions such as "_IELinkClickByText" in reference to the page that is active.

#include <ie.au3>
$oIE = _IECreate ("https://login.salesforce.com/?locale=uk")
$oForm = _IEFormGetObjByName ($oIE, "login")
$oQuery1 = _IEFormElementGetObjByName ($oForm, "username")
$oQuery2 = _IEFormElementGetObjByName ($oForm, "password")
$uname="***********"
$pwd="***********"
_IEFormElementSetValue ($oQuery1,$uname)
_IEFormElementSetValue ($oQuery2,$pwd)
$oButton=_IEGetObjById($oIE,"Login")
_IEAction ($oButton, "click")
_IELoadWait($oIE,0)
_IELinkClickByText($oIE, "Expand All")
_IELinkClickByText($oIE, "Import Leads")
_IELinkClickByText($oIE, "Start the Import Wizard!")

Thanks for any help that you can give!!

Matt

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...