Cannot find hyperlink in user control

16 posts, 0 answers
  1. Cheryl
    Cheryl avatar
    45 posts
    Member since:
    Jul 2006

    Posted 08 Aug 2011 Link to this post

    I have a test set up that logs in, selects/enters some values then submits to the next page and does a verify.
    It then clicks a hyperlink in a contents section that is in a usercontrol in a masterpage place holder to return to the first data entry page and then it iterates through a dataset to select/enter values and submits again.

    The baseurl is set to the primary location,
    The nagivateURL in the first step is set to /
    The compare is set to Title for all elements in the tests (part of the test is a fragment).

    This runs fine on the initial run through.

    When I set it up as a test list using the primary location as the baseurl it works fine.

    When I close the test list and set the baseurl as the secondary location, it falls over when trying to click the hyperlink in the user control and I get this in the log:

    Unable to find the target host (Browser/SilverlightApp) to locate an element. Failure: System.TimeoutException: Wait for condition has timed out
       at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo)
       at ArtOfTest.Common.WaitSync.For[T,V](Func`3 func, T target, V custom, Boolean invertCondition, Int32 timeout)
       at ArtOfTest.Common.WaitSync.For[T,V](Func`3 func, T target, V custom, Int32 timeout)
       at ArtOfTest.WebAii.Core.Browser.WaitForFrame(FrameInfo frameInfo, Int32 timeout)
       at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.GetFrameBrowserInstance(Browser topBrowser, FrameInfo frame, Int32 waitTimeout, String& stringError)

    I originally had the test set up to iterate to the 2nd location via a dataset and was getting the same issue so found an alternative suggestion but am getting the same problem.

    Any suggestions?

    Thanks
  2. Anthony
    Admin
    Anthony avatar
    19 posts

    Posted 09 Aug 2011 Link to this post

    Hi Cheryl,

    Please check the URL for the frame that contains the hyperlink.

    When you're testing elements inside a Frame, there's a URL which is used to connect to the Frame. Is the URL in your test set to work for the primary and secondary locations?

    Check out this video: http://screencast.com/t/oWZSZ1Q4HaHv

    It demonstrates where to find the FrameURL. Note whether the UseQuery property is True or False and whether the query is correct. Those settings can also lead to this type of error.

    All the best,
    Anthony
    the Telerik team
    Vote for Telerik Test Studio at the Annual Automation Honors Voting!
  3. Cheryl
    Cheryl avatar
    45 posts
    Member since:
    Jul 2006

    Posted 09 Aug 2011 Link to this post

    Hi Anthony, thanks for the reply and the video.

    The frame's baseURL was set to the original URL which is why it worked for the first test list (same URL) but not the second.

    I had a play with the settings and have got it set to ~/pagename.aspx with the UserBaseURLHost set to true.

    This works if I do a quick execute, but not if I do it from a test list - on either of the test lists I now get

    "This operation is not supported for a relative URI"

    So it appears that when running from a test list the baseURL of the testlist is being ignored for this situation.

    Are there any other settings I need to check?
  4. Anthony
    Admin
    Anthony avatar
    19 posts

    Posted 09 Aug 2011 Link to this post

    Hello Cheryl,

    The "UseBaseUrlHost" setting is intended to only handle the machine name. We recommend setting your Project BaseURL to "http://server1".

    When UsesBaseUrlHost is set to True, you should not alter the BaseURL under FrameInfo. By default it is the full path: "http://server1/folder1/folder2/index.aspx".

    When you change the Project BaseURL to "http://server2", Test Studio changes the Frame's BaseURL under the hood to "http://server2/folder1/folder2/index.aspx".

    If it is not working correctly after these changes, please let us know.

    Regards,
    Anthony
    the Telerik team
    Vote for Telerik Test Studio at the Annual Automation Honors Voting!
  5. Cheryl
    Cheryl avatar
    45 posts
    Member since:
    Jul 2006

    Posted 09 Aug 2011 Link to this post

    I'm a little confused.  So if the machine name itself it going to remain the same, then I shouldn't use the UserBaseURLHost?

    I need to be able to run the same set of tests on would typically be on the same server but different applications, eg

    http://server1/dev1/folder1/
    http://server1/dev2/folder1/ 

    However potentially I'd need to be able to test on different servers as well.

    I changed the base URL of the frame back to its full path but it now works on the quick execute and the original test list but not the secondary site test list (useBaseUrlHost is set to true but setting it to false makes no difference)

    Note that my test list baseURLs are set to the above, ie the whole URL not just the servername as "recommended" in your reply.

    I would have expected that if the baseURL in the test list was different to the frameinfo baseURL then the test baseurl should be used, otherwise it should allow me to put in a relative page so its not using a hardcoded value.

  6. Anthony
    Admin
    Anthony avatar
    19 posts

    Posted 10 Aug 2011 Link to this post

    Hello Cheryl,

    I was just reminded of a new implementation in this area. Highlight the frame in question in the Elements Explorer, click the "BaseURL" property, and note the description:

    Start with '^/' to substitute the test's BaseURL in place of the caret (^).

    This syntax should supersede the "UsesBaseUrlHost" setting and insert whatever is set for "Project Settings > BaseURL" in place of the caret.

    Kind regards,
    Anthony
    the Telerik team
    Vote for Telerik Test Studio at the Annual Automation Honors Voting!
  7. Cheryl
    Cheryl avatar
    45 posts
    Member since:
    Jul 2006

    Posted 14 Aug 2011 Link to this post

    Thanks for that Anthony. I've managed to get it working using that - I had tried it last week but it didnt work for some reason so I'm not sure what I've done differently.

    HOWEVER, I have just noticed that if I close down Test Studio and go back into it, the "AlwaysUseTitleInCompare" setting has reverted back to False so perhaps this was the issue.  Another bug?
  8. Anthony
    Admin
    Anthony avatar
    19 posts

    Posted 15 Aug 2011 Link to this post

    Hi Cheryl,

    You're welcome and I'm glad to hear it.

    I believe you are correct and that is a bug. I just reproduced the behavior and logged a bug report. You can track the PITS Issue here: Public URL.

    All the best,
    Anthony
    the Telerik team
    Vote for Telerik Test Studio at the Annual Automation Honors Voting!
  9. Mercedes
    Mercedes avatar
    6 posts
    Member since:
    Jul 2012

    Posted 06 May 2013 Link to this post

    Hi,
        I am having a similar issue. I did all my recording and most of my testing on
    http://policyadmindev/ and was successfully running my tests. but now i need to run a test against http://policyadminint/ which will be the same application but a different environment. I changed some of the settings to connect to the new URL but i noticed that the script keeps failing because of the FrameVisibleFrame which has the baseURL set to http://policyadmindev/. How can I make changes so that i do not have to change the visible frame properties every time i need to execute the script against different environments.



    Thank you
  10. Boyan Boev
    Admin
    Boyan Boev avatar
    1072 posts

    Posted 09 May 2013 Link to this post

    Hi Cheryl,

    Simply set the frame's UsesBaseUrlHost property to True. When you switch the BaseURL before executing the test, Test Studio will automatically swap the BaseURL portion for the frame under the hood.

    Please check out the bottom of this article in order to get more detailed information.

    Let me know if you need further assistance.

    Regards,
    Boyan Boev
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  11. Mercedes
    Mercedes avatar
    6 posts
    Member since:
    Jul 2012

    Posted 17 May 2013 Link to this post

    I did that but was still getting error messages. I had to close Test Studio and reopen. That fixed the problem for me.

    I am having some issues with the version of the Test Studio that i have. After every Test List Execution, i get a pop up error message saying "The Results cannot be loaded". I have to close that window and then the results pop up and causes Test Studio to hang up sometimes.
  12. Boyan Boev
    Admin
    Boyan Boev avatar
    1072 posts

    Posted 17 May 2013 Link to this post

    Hi Brian,

    I am sorry to hear you are running into this problem.

    In order to assist you best please elaborate a bit more on your scenario:

    1. Please send us a clear copy of the application log

    2. Are you executing the test list on your local machine or remotely on a execution server/VM?

    3. Can you please record a Jing video demonstrating the issue? 

    Hope to hear from you soon.

    Greetings,
    Boyan Boev
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  13. Mercedes
    Mercedes avatar
    6 posts
    Member since:
    Jul 2012

    Posted 23 May 2013 Link to this post

    Hello Boyan,
         Sorry for the delay in getting these details back to you.

    1. I checked the application log and it is empty.
    2. I am executing the test list on a VM
    3. http://screencast.com/t/vH1c2xS26zfl

    If you notice at the end of the video, you can see that i have to click on the OK button to close the pop up several times before the results are loaded to the Telerik results section.

    Please let me know if you need any further information.
  14. Boyan Boev
    Admin
    Boyan Boev avatar
    1072 posts

    Posted 24 May 2013 Link to this post

    Hello Brian,

    It seems Test Studio is trying to load the other results also, however it cannot find them. Are these results in the folder physically (i.e. C:\Testing\WC\AT_PolicyAdmin_WC\Results\NewBusiness.....)?

    Did you remove them manually from the database?

    What version of Test Studio do you use?

    You can try to create a new database for your Scheduling engine through the Configure Scheduling server application (see attached screen shot). You will loose all your current results and you'll have to register your remote execution servers again. 

    You need to enable the application log first and then reproduce the issue. 

    Regards,
    Boyan Boev
    Telerik
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  15. Mercedes
    Mercedes avatar
    6 posts
    Member since:
    Jul 2012

    Posted 28 May 2013 Link to this post

    I was manually moving the screenshots and log files into a sub folder
  16. Boyan Boev
    Admin
    Boyan Boev avatar
    1072 posts

    Posted 31 May 2013 Link to this post

    Hi Brian,

    That is the reason why Test Studio is looking for them. It is not recommended  to move the files manually.

    There are a few options how you can resolve this issue.

    1. Move the files back to the original folder and reload the results form the Results tab.

    2. Delete the run results from the calendar under the Results tab. 

    3. Delete the results directly from the database. This can be done from Results tab > Scheduling Server ribbon > Manage Results window. This will completely delete the run results from the Scheduling database. 

    Hope this helps.

    Regards,
    Boyan Boev
    Telerik
    Free summer webinars on advanced web automation tactics hosted by Jim Holmes & Adam Goucher.
    Reserve your seat today!
Back to Top