Read the TestCases description

Ask general questions here.
[email protected]
Posts: 7
Joined: Tue Mar 27, 2018 10:29 am

Read the TestCases description

Post by [email protected] » Mon Nov 18, 2019 1:51 pm

Hi,

To read the name of a Test Case is not hard. This sub do the trick.

Public Sub ReadAndLogTCDesc()
Dim StTcDesc As String
StTcDesc = TestSuite.CurrentTestContainer.Name.ToString()
MsgBox(StTcDesc)
End Sub

But how do I read the 'Description' property of the same test case?

BR // Peter

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 5459
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Read the TestCases description

Post by odklizec » Mon Nov 18, 2019 2:21 pm

Hi,

A C# code to read TC description looks like this:

Code: Select all

var TC = TestSuite.CurrentTestContainer as TestSuiteEntryContainer;
string descString = TC.Comment;
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

[email protected]
Posts: 7
Joined: Tue Mar 27, 2018 10:29 am

Re: Read the TestCases description

Post by [email protected] » Mon Nov 18, 2019 2:30 pm

Thanks!