how to validate file names
Posted: Mon Sep 28, 2020 3:37 am
Hi All,
I am new to Ranorex. I have below requirement-
Few pdf files are placed in below location and i need to extract name of all the files.
location: H:\Test\Project
I am trying to code using C#. But the below code is not working.
Thanks for the help!
IList<Ranorex.Text> childLstItems = GlobalVariable.repo.RNDIDDTEST.ItemsView.FindChildren<Ranorex.Text>();
for(int i=0; i<=childLstItems.Count-1; i++)
{
if((childLstItems).TextValue == "testfile") //this is a pdf file name that i am trying to validate
{
Report.Success("Successfully login");
}
}
I am new to Ranorex. I have below requirement-
Few pdf files are placed in below location and i need to extract name of all the files.
location: H:\Test\Project
I am trying to code using C#. But the below code is not working.
Thanks for the help!
IList<Ranorex.Text> childLstItems = GlobalVariable.repo.RNDIDDTEST.ItemsView.FindChildren<Ranorex.Text>();
for(int i=0; i<=childLstItems.Count-1; i++)
{
if((childLstItems).TextValue == "testfile") //this is a pdf file name that i am trying to validate
{
Report.Success("Successfully login");
}
}