Forum Discussion

i404's avatar
i404
Contributor
14 years ago

Global object

Hi Guys,



As I put all my routines in a script and call if from another. I am facing this issue that my object cannot be parse to another routine. For this example, it could not find "page" object.



Sub Launch_Firefox(URL)

  Dim firefox, firefox_load, page, dialog

  .

  .

  .

  Set page = Aliases.firefox

End Sub



Sub Login(page, username, password)

  Dim login

    Set login = page.FormLogin.Dialog.Table

    login.Username.Text = username

    login.Password.Text = password

    Call login.Button.Click()

End Sub



Thanks in advanced.



Regards,

Ian

1 Reply

  • i404's avatar
    i404
    Contributor


    Solved... :-)

    Just move "Dim firefox, firefox_load, page, dialog" to the top.



    Cheers

    Ian