This is a migrated thread and some comments may be shown as answers.

Still facing problem with HtmlSelect

4 Answers 22 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 25 Apr 2013, 04:09 PM
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 _

4 Answers, 1 is accepted

Sort by
0
Michael
Top achievements
Rank 1
answered on 26 Apr 2013, 07:36 AM
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..
 
0
Plamen
Telerik team
answered on 26 Apr 2013, 08:32 AM
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
0
Michael
Top achievements
Rank 1
answered on 26 Apr 2013, 10:06 AM
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.)
0
Plamen
Telerik team
answered on 26 Apr 2013, 11:03 AM
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
Tags
General Discussions
Asked by
Michael
Top achievements
Rank 1
Answers by
Michael
Top achievements
Rank 1
Plamen
Telerik team
Share this question
or