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

RadPanelBarItem: 'Some' action -> 'Navigate' to leads to "Timeout error" in FF

18 Answers 185 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Nataly
Top achievements
Rank 1
Nataly asked on 11 Aug 2010, 10:12 AM
Hello,

Sometimes I get "Wait for condition has timed out" error in FF 3.6.8 on executing the following step:
RadPanelBarItem: 'Units' action -> 'Navigate' to 'javascript:SetUrl('Units/Parts/UnitsRibbon.aspx','Units/Parts/UnitsLeftPanel.aspx','Units/Parts/UnitsMainContent.aspx');'

I've set 'Wait on elements timeout"=25000 but it did not help.

Error text:
Failure Information:
~~~~~~~~~~~~~~~
Wait for condition has timed out
InnerException:
System.TimeoutException: Wait for condition has timed out
   at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo)
   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.Controls.HtmlControls.HtmlControl.GetValue[T](String propertyName, T defaultValue)
   at ArtOfTest.WebAii.Controls.HtmlControls.HtmlControl.GetValue[T](String propertyName)
   at ArtOfTest.WebAii.Controls.HtmlControls.HtmlControl.CallMethod[T](String methodCall)
   at Telerik.WebAii.Controls.Html.RadPanelBarItem.get_NavigateUrl()
   at Telerik.WebAii.Controls.Html.RadPanelBarItem.get_ShouldNavigate()
   at Telerik.WebAii.Controls.Html.RadPanelBarItem.Navigate()
   at Telerik.WebAii.Design.Translators.Html.PanelBar.RadPanelBarItemActionDescriptor.Execute(Browser browser)
   at ArtOfTest.WebAii.Design.Extensibility.HtmlActionDescriptor.Execute(IAutomationHost autoHost)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep()

This error is absent in IE.

Could you help me please to avoid the error?

Thank you in advance.

18 Answers, 1 is accepted

Sort by
0
Konstantin Petkov
Telerik team
answered on 11 Aug 2010, 12:31 PM
Hi Nataly,

It seems this action is unable to complete getting a value from the RadPanelBarItem client-side property. I'm not sure where the problem comes from though so will need more information to further help.

Can you share the test log please? I wonder if the test could be designed in a more reliable way so that it doesn't fail any time.
 
Regards,
Konstantin Petkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Nataly
Top achievements
Rank 1
answered on 11 Aug 2010, 12:49 PM
Hello Konstantin,

Thank you for the reply. Please find test log attached.

In my test "[CodedStep7] : Refresh frames' DOM" has the following code:
ActiveBrowser.RefreshDomTree();

I tried to execute the test with this step and without it. But it does not help.

Regards,
Nataly
0
Konstantin Petkov
Telerik team
answered on 11 Aug 2010, 12:57 PM
Hello Nataly,

I'd definitely insert a WaitForVisible verification for the PanelBarItem before I record the item Click/NavigateTo action. If you add that step you shouldn't need these big timeouts and the RefreshDomTree() call in the previous steps.

Here is a video that elaborates on the best practices in recording scenarios. In case you haven't seen that I think you may find it useful as well.

All the best,
Konstantin Petkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Nataly
Top achievements
Rank 1
answered on 11 Aug 2010, 01:22 PM
Hi again Konstantin,

Thank you for the help! I've added WaitForVisible verification and the test is passed.

But could you please tell me how to write such verification for the elements which are absent before test execution?
For example: The test creates new entity and then verifies it's presence in RadGrid. It's impossible to add the Grid's element before it's creation so I can't add it to project's elements and I have to search it trough 'Find.ByExpression' command.

Thank you in advance
0
Konstantin Petkov
Telerik team
answered on 11 Aug 2010, 01:34 PM
Hi Nataly,

How about if you perform a verification of the RadGrid Table Item count before and after adding the new item? I think these verifications will bring the same value and you don't need to look for a more complex solution to make sure this functionality works.

As to the verification for an element that does not exist, you can do so after the element appears only. Then chose the Verify Element Not Exist from the Quick Tasks and move the step up in the test.

Greetings,
Konstantin Petkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Nataly
Top achievements
Rank 1
answered on 11 Aug 2010, 02:17 PM
Hi again Konstantin,

This solution sounds good! But I did not found how to  know RadGrid Table Items count before the row adding.
I suppose I shall write items count to variable and then use it's increment in coded step at the end of test isn't it? Could you please give an examples of these actions?

Thank you very much!
0
Konstantin Petkov
Telerik team
answered on 11 Aug 2010, 02:44 PM
Hello Nataly,

This is a built-in verification of the RadGridTableView Translator. I've attached an image for you to show you the list of the Quick Task verification of that RadGrid translator currently available. Note the hierarchy of translators about this component as items appearing over the base element nub.

Regards,
Konstantin Petkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Nataly
Top achievements
Rank 1
answered on 11 Aug 2010, 04:55 PM
Hi again Konstantin,

The solution worked fine when I used recorded step.

But I customized the step in code and now it fails.
[CodedStep16]:
            GridTableView GridItemsTable = Pages.GridPage.FrameMainGrid.GridItemsTable;
            GridItemsTable.Wait.ForExists(55000);
            Wait.For<GridTableView>(c => c.ControlAssert().NumberValue("DataItems.Count", 90,      ArtOfTest.Common.NumberCompareType.Equals), GridUnitsTable, 10000);

Error log:
Failure Information:
~~~~~~~~~~~~~~~
Exception thrown executing coded step: '[CodedStep16] : Wait for units grid refresh'.
InnerException:
System.ApplicationException: Exception thrown during the wait for a condition. Error: Unexpected error while waiting on condition. Error: ArtOfTest.Common.Exceptions.AssertException: Number match failed (CompareType:Equals) - [Expected:90],[Actual:89]
   at ArtOfTest.WebAii.Controls.BaseControlAssert`1.Assert(Boolean condition, String message, String expected, String actual, Boolean throwAssert)
   at ArtOfTest.WebAii.Controls.BaseControlAssert`1.Assert(Boolean condition, String message, String expected, String actual)
   at ArtOfTest.WebAii.Controls.BaseControlAssert`1.AssertNumber(Int32 leftPortion, Int32 rightPortion, NumberCompareType compareType)
   at Telerik.WebAii.Controls.Html.RadControlAssert.NumberValue(String controlPropertyName, Int32 expected, NumberCompareType compareType)
   at Project.Item_Creation.<CodedStep16>b__0(GridTableView c) in c:\Documents and Settings\Administrator\Desktop\Project\Item_Creation.aii.cs:line 204
   at ArtOfTest.Common.WaitAsync._worker_DoWork[T,V](Object waitParam)
   at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo)
   at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout)
   at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Int32 timeout)
   at Project.Item_Creation.Item_Creation_CodedStep16() in c:\Documents and Settings\Administrator\Desktop\Project\Item_Creation.aii.cs:line 204

I had 89 rows in the grid before new item creation, therefore the step should wait till row's count will be 90. Correct me please if it's not right.
Could you please tell me where is the mistake?

Thank you.
0
Cody
Telerik team
answered on 11 Aug 2010, 05:57 PM
Hello Nataly,

I am sorry you have run into this problem There's a known bug in the coded Wait.For function. We recently fixed this bug in our latest internal build, 2010.2.806. Please give it a try.

Best wishes,
Cody
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Nataly
Top achievements
Rank 1
answered on 11 Aug 2010, 06:17 PM
Hello Cody,

I'm using Telerik.WebUI.TestStudio.QA.2010.2.806 build now and the problem is reproduced :(

Thanks,
Nataly
0
Nataly
Top achievements
Rank 1
answered on 12 Aug 2010, 07:55 AM
Hello Telerik team,

Could you please concretize in which build the issue with the coded Wait.For function is fixed and where/when the build is available?
The issue is very important for me and my project.

Thank you,
Nataly
0
Pavel
Telerik team
answered on 12 Aug 2010, 08:39 AM
Hi Nataly,

The problem with Wait.For should be fixed in the 2010.2.806 build which you are using. Furthermore I just tested the code conversion of the Grid DataItem count verification and it works as expected on my end. Can you confirm that in your case the Grid Items are indeed increased to the number you are trying to verify against? You can also add an additional step which verifies that the RadGridTableView is not in insert mode anymore, just before you verify the DataItems count.

Let us know how it goes.

Best wishes,
Pavel
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Nataly
Top achievements
Rank 1
answered on 12 Aug 2010, 10:19 AM
Hi Pavel,

The recorded step RadGridTable('TableName') (Wait for): 'Data' item count 'Equals' 100; doesn't work in IE7 at all, but works in FF.
I've tested the step in FF with '99' value, then added a row and tested in IE for '100' value. It was failed in IE as the result.

The error:
RadGridTable: 'Data' item count 'Equals' verification failed
Expected: '100', Comparison: 'Equals', Actual: '99'.

Converted to code step:
            GridTableView GridItemsTable = Pages.GridPage.FrameMainGrid.GridItemsTable;
            GridItemsTable.Wait.ForExists(55000);
            Wait.For<GridTableView>(c => c.ControlAssert().NumberValue("DataItems.Count", 101,                          ArtOfTest.Common.NumberCompareType.Equals), GridUnitsTable, 50000);

This step was also failed with the error:
 Error: ArtOfTest.Common.Exceptions.AssertException: Number match failed (CompareType:Equals) - [Expected:101],[Actual:100]
But real rows cont after test's fail is 101 - seems that the step did not perform 'wail' action at all - it deed not wait for 50 seconds!

In reply to: "You can also add an additional step which verifies that the RadGridTableView is not in insert mode anymore, just before you verify the DataItems count. ". Could you please give an example of this step?


After each test I ensured that grid's rows count is equal to 'Expected' value which was set in the step.

Thank you.
0
Pavel
Telerik team
answered on 12 Aug 2010, 12:42 PM
Hello Nataly,

I am attaching a screenshot illustrating the quick task you can use to verify the Grid is not in insert mode. You can also add an additional delay step just to ensure the problem is not caused by a synchronization issue.

All the best,
Pavel
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Nataly
Top achievements
Rank 1
answered on 12 Aug 2010, 01:39 PM
Pavel,

There is no such option in my 'Quick tasks' menu. Please, see it attached

Thanks,
Nataly
0
Pavel
Telerik team
answered on 12 Aug 2010, 02:04 PM
Hello Nataly,

This verification is present only if the Grid renders its CommandItem, so in your case that may not be true. In any case the delay option is still valid, to ensure that there is no synchronization problem.

I am also attaching a simple test illustrating a scenario similar to yours which is running against this online example. Can you try it and let me know if you see the problem with it as well?

Kind regards,
Pavel
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Kamil
Top achievements
Rank 1
answered on 13 Apr 2011, 09:27 AM
Dear Telerik team,

Could you please tell me is there an option to extend the WaitOnElementsTimeout period, the software that I am testing requires a little longer to open for example, so every time I record a test, I have to go back to the test and change the WaitOnElementsTimeout period manually, is there a way to change that as a default for all tests. You have most likely explained this already and i apologise for bothering You, I have still to learn to use Telerik.

Many thanks in advance

Kind Regards

Georgi Andreev  


0
Cody
Telerik team
answered on 13 Apr 2011, 06:32 PM
Hi Kamil,

We understand the problem you are running into. Unfortunately at this time there isn't a feature built into the product to automatically change the WaitOnElementsTimeout property. The good news is that one of my developers is actively working on this for our upcoming R1 release due out at the end of this month. We plan on implementing a sort of "global override" that you can set during test execution. Using the global override you set what you want the timeout to be and all test steps will use that value. So just hang on a little longer and we'll have a solution to this problem.

Greetings,
Cody
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Nataly
Top achievements
Rank 1
Answers by
Konstantin Petkov
Telerik team
Nataly
Top achievements
Rank 1
Cody
Telerik team
Pavel
Telerik team
Kamil
Top achievements
Rank 1
Share this question
or