Still facing problem with HtmlSelect

5 posts, 0 answers
  1. Michael
    Michael avatar
    21 posts
    Member since:
    Apr 2013

    Posted 25 Apr 2013 Link to this post

    Exception thrown executing coded step: '[Test_Product_Overwiew_Complete_Check_Paging_Buttons_Enabled] : Check Paging Buttons disabled or enabled'.
    InnerException:
    When trying to get the selected value, i often (not always) get this error.
    i used the selectedoption value and i run the the options collection. in both cases i often get this error

    We are geting more and more frustrated!!

    System.TimeoutException: Wait for condition has timed out
       at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo, Object target)
       at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout, WaitResultType errorResultType)
       at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout)
       at ArtOfTest.WebAii.Core.Browser.WaitUntilReady()
       at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request, Boolean performDomRefresh, Boolean waitUntilReady)
       at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request)
       at ArtOfTest.WebAii.Core.Actions.InvokeScript(String script)
       at ArtOfTest.WebAii.BrowserSpecialized.InternetExplorer.InternetExplorerActions.InvokeScript(String script)
       at ArtOfTest.WebAii.ObjectModel.Element.GetValue[T](String propertyName, T defaultValue)
       at ArtOfTest.WebAii.ObjectModel.Element.GetValue[T](String propertyName)
       at ArtOfTest.WebAii.Controls.HtmlControls.HtmlOption.get_Selected()
       at _
  2. Michael
    Michael avatar
    21 posts
    Member since:
    Apr 2013

    Posted 26 Apr 2013 Link to this post

    To add more information: this happens when checking the selected value of an html select control. It happens vis coded step and recorded step.
    I run thre the options collection too and get the error in an option object too, onlx not when checking the selected for null.

    the main problem: it doesnt happen always, but in most cases when a test runs the second or third time

    Of course nothing changed on the tasted page..
     
  3. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 26 Apr 2013 Link to this post

    Hi Michael,

    The error means that Test Studio timed out waiting for the browser to return to a ready state. To overcome this, you need to increase the ClientReadyTimeout that specifies the amount of time to wait for a ready state. You can do that from the Test List Settings (if you are running your test as part of a Test List) or from Quick Execution Options (if it's a Quick Execution).
     
    If you continue to have difficulty, we'll need to reproduce the issue locally in order to investigate what is happening and find a workable solution for you. Please provide us with a copy of your test and access to your application. If it is not possible to grant us access to your application, please take a Fiddler trace using FiddlerCap and send it to us in a zip file. A Jing video demonstrating the issue may also help us to better understand what is happening. If you feel any of this information is sensitive, you can submit a support ticket which is confidential, unlike this forum.

    Regards,
    Plamen
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  4. Michael
    Michael avatar
    21 posts
    Member since:
    Apr 2013

    Posted 26 Apr 2013 Link to this post

    Sorry, but the only way to get the selected text or value without this problem is this way:

     if (Pages.FR_Navigation.ProductOverview_Paging_Dropdown != null)
                {
                    foreach(HtmlOption option in Pages.FR_Navigation.ProductOverview_Paging_Dropdown.Options)
                    {
                    if ( option != null)
                        {
                            if(option.Attributes.Any(o=>o.Name == "selected"))
                            {
                                pagingNumberSet = int.TryParse(option.Text, out pagingNumber);
                                break;
                            }
                        } 
                    }
                }
    (the tryparse of cours is special for my needings.)
  5. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 26 Apr 2013 Link to this post

    Hello Michael,

    I am glad to hear you found a workaround. If you want us to investigate and find the root cause of this issue however, we'll need to reproduce it in our source code debugging environment. 

    Regards,
    Plamen
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
Back to Top