User code IF statement on a text field existence
Posted: Fri Oct 09, 2020 1:47 pm
I am creating user code in Ranorex for an IF statement that revolves around whether or not a text count field is there or not. The xpath to the field (repo element name is dayCount) that spy has right now is: ?/?/text[@name='60']
So I am going to use pseudocode here to denote what I want and what problem I am seeing.
IF (repo.dayCount.Exists())
{
move slider bar
} else {
report message
}
When I try using Exists I get an error during the build that says "Text does not contain a definition for Exists......."
What should I use to test for the existence of this element or what am I missing? I am very new to Ranorex.
I am using Ranorex 9.1.0
I am testing a desktop app in windows 10
I am using C#.
So I am going to use pseudocode here to denote what I want and what problem I am seeing.
IF (repo.dayCount.Exists())
{
move slider bar
} else {
report message
}
When I try using Exists I get an error during the build that says "Text does not contain a definition for Exists......."
What should I use to test for the existence of this element or what am I missing? I am very new to Ranorex.
I am using Ranorex 9.1.0
I am testing a desktop app in windows 10
I am using C#.