Help Replace empty string with valid string

Ask general questions here.
Paprikano
Posts: 3
Joined: Mon Feb 11, 2013 9:58 am

Help Replace empty string with valid string

Post by Paprikano » Wed Mar 20, 2013 9:20 am

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!!

mdgairaud
Posts: 87
Joined: Sun Aug 05, 2012 11:59 am
Location: Bilbao, Spain

Re: Help Replace empty string with valid string

Post by mdgairaud » Wed Mar 20, 2013 4:31 pm

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")