0

我的一些脚本在作为测试运行时工作得非常好。但是当我在测试列表中运行测试时。为什么我不理解失败了。请提供帮助。测试日志:

总成绩:通过

  • 使用 .Net 运行时版本:“4.0.30319.18052”进行测试执行。构建版本是“2013.1.709.0”。

    • 开始执行......
    • 检测到 Silverlight 测试。设置 EnableSilverlight=True
      • 在测试中检测到自定义代码。定位测试程序集:TestProject(BA).dll。

    '08/09/2013 PM 06:04:53' - 发现组装:

-------------------------------------------------- ----------

'08/09/2013 PM 06:04:53' - 使用 'InternetExplorer' 版本 '10.0' 作为默认浏览器。

  • “通过”: 1. 导航至:

“通过”:2. radmaskedtextbox:点击“5”偏移动作。

'Pass' : 3. radmaskedtextbox: 输入'abc' 文字动作。

'Pass' : 4. 左键单击 Item1Textboxview

'Pass' : 5. 在 PasswordPasswordbox '08/09/2013 PM 06:05:07' 中输入 'abc@#' -

'通过' : 6. 单击 RadBtnSignInRad 按钮

'通过' : 7. [Converting_Quote_CodedStep1] : LeftClick on CustomersTextblock, RequiresSilverlight=True

'Pass' : 8. 验证 QuoteTextblock 的左侧是否等于 19

'通过' : 9. [Converting_Quote_CodedStep3] : LeftClick on QuoteTextblock, RequiresSilverlight=True

'通过' : 10. LeftClick on PARTContentPresenterContentpresenter '08/09/2013 PM 06:05:29' -

'通过' : 11. [Converting_Quote_CodedStep] : LeftClick on DropDownPartRadtogglebutton, RequiresSilverlight=True

“通过”:12. [Converting_Quote_to_Invoice_CodedStep]:radmenuitem:“到发票”点击操作。,RequiresSilverlight=True

'通过' : 13. 单击 BtnPrintRadribbon 按钮

“通过”:14。 radwindow:“关闭”操作。

'Pass' : 15. 单击 SaveCloseRadribbon 按钮

'通过':16. [Converting_Quote_CodedStep2]:左击 InvoiceTextblock,RequiresSilverlight=True '08/09/2013 PM 06:05:41' -

'通过' : 17. LeftClick on BlueBicycleTextblock '08/09/2013 PM 06:05:45' -

'通过' : 18. 单击 BtnCloseRadribbon 按钮

我正在附加错误消息

失败信息:~~~~~~~~~~~~~~~ 执行编码步骤抛出异常:'[Add_New_Quote_CodedStep3] : LeftClick on PARTFooterCellBorderBorder, RequiresSilverlight=True'.InnerException:

ArtOfTest.Common.Exceptions.FindElementException: Element Not found!
FindExpression used: 

[automationid 'Exact' dtgProductAndServiceInvoice] AND [XamlTag 'Exact' radgridview]
[XamlPath 'Exact'     /border[name=PART_MasterGridContainer]/
grid[name=HierrarchyBackground]/
gridviewscrollviewer     [automationid=PART_ItemsScrollViewer]/
grid[name=PART_RootPanel]/
gridviewfooterrow[automationid=PART_FooterRow]
/border[name=PART_FooterRowBorder]/selectivescrollinggrid[0]/
datacellspresenter [name=PART_DataCellsPresenter]/ grid[0]/
itemspresenter[0]/gridviewcellspanel[0]/
gridviewfootercell[0]/border[name=PART_FooterCellBorder]]

 at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait,StringextraExceptionInfo,Object target)     

在 ArtOfTest.Common.WaitSync.For[T](Predicate`1 谓词,T 目标,布尔 invertCondition,Int32 超时,WaitResultType errorResultType)

 at ArtOfTest.WebAii.Silverlight.VisualWait.ForExistsInternal
(Int32 timeout, Boolean invertCondition)

at ArtOfTest.WebAii.Silverlight.VisualWait.ForVisible(Int32 timeout)

在 ArtOfTest.WebAii.TestTemplates.XamlElementContainer.Get(XamlFindExpression expr,布尔 waitOnElement,Int32 超时)

在 ArtOfTest.WebAii.TestTemplates.XamlElementContainer.Get(XamlFindExpression expr) 在 ArtOfTest.WebAii.TestTemplates.XamlElementContainer.Get[TControl](XamlFindExpression expr) 在 ArtOfTest.WebAii.TestTemplates.XamlElementContainer.Get[TControl](String[] 子句)在 TestProject_BA_.Pages.BPage.SilverlightAppElement.get_PARTFooterCellBorderBorder() 在 d:\pranavi\TestProject(BA06)\Pages.g.cs:line 1808

在 TestProject_BA_.Add_New_Quote.Add_New_Quote_CodedStep3() 在 d:\pranavi\TestProject(BA06)\4#Invoice\Add New Quote.tstest.cs:line

请看附件。

4

1 回答 1

1

如果您正在测试一个 Web 应用程序,正如您所知,telerik 会根据 baseURL 测试 UI 组件。当您作为测试运行时(相对于作为 testList 运行),有 2 个不同的设置位置。交叉验证两个设置部分中的 baseURL(如果它们相同)。如我所见,错误是未找到元素。这可能是因为该元素的关联 baseURL 是不同的。

于 2014-08-06T19:08:32.067 回答