Page 1 of 1

Help Replace empty string with valid string

Posted: Wed Mar 20, 2013 9:20 am
by Paprikano
Hi guys, I have the following simple code
public void Date0()
{
if (varList0.Length.Equals(0))
{
//varList0.Insert(0, "20/03/2013");
varList0.Replace(" ", "21/03/2013");

}

}

and what I want to achieve is, when a recording re-plays, it must replace an empty date control with my own random date string like as it is in the code above, so the validation event I'm using is Exist, when I try others like AttributEqual and when I match it against my variable "varList0" it gives a Ranorex warning error that "Attribute name must not be empty"

is this in anyway possible, please advice??

and


Thanks in advance!!

Re: Help Replace empty string with valid string

Posted: Wed Mar 20, 2013 4:31 pm
by mdgairaud
Hi,

I'm use this to assign values:

Code: Select all

repo.MyPath.MyElement.Value = "value";
not sure if it works with a DatePicker Control


regards,
Mateo.


p.d. you may also try:

Code: Select all

repo.MyPath.MyElement.AttributEqual ("InnerText","new text")