Forum Discussion

learnTestComple's avatar
14 years ago

Not Able to Launch the Web Base Application.

Hi



I am facing an issue while  launching the Web Based Application.



Note : I am using IE 8.0.



I am using below mentioned code:



Sub Test


Call WinExec(BuiltIn.GetCOMServerPath("InternetExplorer.Application"), SW_MAXIMIZE)


Call Sys.WaitProcess("iexplore", 20000)


Set Process = Aliases.iexplore


Call Process.ToUrl("http://www.google.com")



End Sub



Instead of navigating the URL,Everytime it is opening the blank page. Do let me know if anything wrong with the code?

3 Replies

  • Hi,


    I guess the problem is that "Process" object doesn' t have "ToUrl" method, but page does (or also a window which contains page).


    So you should use it like this:


    Process.WaitPage("*", 10000).ToUrl("http://www.google.com")

  • pankaj_h17's avatar
    pankaj_h17
    Occasional Contributor
    With the above Code as:




    Sub Test1

    Call WinExec(BuiltIn.GetCOMServerPath("InternetExplorer.Application"), SW_MAXIMIZE)

    Call Sys.WaitProcess("iexplore", 20000)

    Set Process = Sys.Process("iexplore")

    Process.WaitPage("*", 10000).ToUrl(http://www.google.com)

    End Sub



    I am not able to INVOKE the browser itself. Am I missing somthing here in above code.... Please respond as soon as possible...



    Thanks in Advance,

    Pankaj


    Test1 WinExec(.GetCOMServerPath("InternetExplorer.Application"), SW_MAXIMIZE) .WaitProcess("iexplore", 20000) Process = .Process("iexplore")Process.WaitPage("*", 10000).ToUrl()
  • Hi Pankaj,



    There is a mistake in the last code line of the Test1 function's body - the ToUrl method requires a string value to be passed as a parameter:

    ... 

    Process.WaitPage("*", 10000).ToUrl("http://www.google.com")

    ...


    To learn about the method see the Page.ToUrl help topic.