Forum Discussion

jlivengood's avatar
jlivengood
Occasional Contributor
14 years ago

ToUrl method not working after Upgrade

I have what maybe the simplest script for testing a web app in the world. It hopefully just goes to my web apps login page.It looks like the following.

function TestLogin()

{

   var proc = TestedApps["firefox"]["Run"](1,true);

    proc["ToUrl"](
http://xxx.yyy.com/login.aspx);

}



Right now my browser launches,the browser homepage is displayed, and nothing else happens. My apps login page never appears. Log says the script executed fine.  I saw some posts stating that sometimes if a trial of TestComplete is upgraded to an Enterprise Version (as mine was) you can have some problems with the ["ToUrl"] method executing before the browser gets to completely load the homepage (line 1 of TestLogin() essentially).



Post is here(http://smartbear.com/forums/forum/post/?mode=singleThread&thread=675164ed-cbe9-41d6-9978-5324d4599370) I upped the Auto-wait timeout per the post suggestion but this did not help. Any suggestions on how to remedy this would be greatly appreciated.  


  • Hi Jason,





    We have reproduced the behavior with Mozilla Firefox 5, but the method works correctly with Mozilla Firefox 3 and 4. Mozilla Firefox 5 is not supported by TestComplete 8.50.





    Is this the case?


  • jlivengood's avatar
    jlivengood
    Occasional Contributor
    I am using FireFox 4 and IE 9. Behavior exists with both browsers. I installed a trial version of Test Complete on my laptop at home and ran my project and the behavior goes away.(scripts run successfully) Also, had another developer here run the sripts on his machine and the script runs fine as well. Issue either seems to be with my machine here at work, or with the install on my machine. Note I did some load testing with this install earlier this summer and it worked great. I am just sort of at a loss as to what to do in terms of troubleshooting.



    Again, browser fires up but nothing else. Do you have any recommendations ? Any advice or direction would be greatly appreciated
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Is that a direct copy and paste of your code?  If so, you don't have the link wrapped in quotes to indicate it's a string. 



    Another question:  You're tested app you're calling, is it a tested app for just the browser or is it something listed as "Web mode" which includes URL's and such?  If you are using WebMode, you can actually have the tested app open at a particular page directly.  I'm not certain but I think the behavior is different in that when checking for existance of the ToURL method and it's ability to run.



    Just some things to look at in your investigations.
  • jlivengood's avatar
    jlivengood
    Occasional Contributor
    Robert thank you for your reply. You are correct my example was missing quotes. However, I add the quotes (see the direct copy and paste below) and I get the same behavior. I checked the RunMode you spoke of and in my TestedApps the RunMode is Listed as "Simple".  I have other options to pick from(such as Profile, Debug)  for RunMode in the dropdown but "WebMode" is not one of them. I am open to any advice or direction and thanks again for your input.



    var proc = TestedApps["firefox"]["Run"](1,true);

    proc["ToUrl"]("http://epsgstage.xxx.com/default.aspx");

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Try this:




    1. Double click on your TestedApps node in your project explorer.  This will open an edit pane for tested apps

    2. Right click on the pane and select "Add Web Page"

    3. Fill in the info for browser and page URL and click OK to save



    Now try your code with the new TestedApp object.



    This is just an experiment to see if this is somehow a difference between a browser as a tested app and a web page as a tested app.
  • jlivengood's avatar
    jlivengood
    Occasional Contributor
    Dear Robert,

      Thank you for your reply again. Before I got a chance to look at the post again, I rolled the browsers back from FireFox 4 to FireFox 3.5 and from IE9 to IE7. (IE8 was unsuccessful in getting the scripts to run).



    After doing this the script ran without a problem. I will roll forward again in the near future and try your suggestions out at that time. Thank you for your help with this.



    Jason
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Out of curiousity, I know you said you tried the trial of TC at home (which I'm assuming would be the TC 8.50 trial version).  What version of TC are you experiencing the problem with?  The reason I ask is that, depending upon the version of TC, browser support may be different.  For example, TC 7.20 is when support for Firefox 3.5 was added.   Firefox 4 and IE 9 had not been added until TC 8.50.  IE 8 was added with TC 7.0.  Additionally, different .NET platforms are supported with different versions with TC 8.50 actually deprecating support for certain older platforms.