Validate.NotExists Overloads Problem
Posted: Mon Feb 03, 2014 1:41 pm
In order to confirm that an action has taken place on my webpage application I am trying to confirm that a button no longer exists. I originally recorded this and then converted it to UserCode:
This code works as is but I can't use it directly as it returns a void. The content of the page requires a manual refresh for it to re-read the database and draw the required buttons. Sometimes this is quick but at times can take upto 30 seconds so I need to put this validation into a loop. Therefore I have chosen to use one of the overloads that returns a boolean. I have come up with this basic structure:
The problem is that this is suddenly giving me the error:
Does anyone have any suggestions as to why using the overloads of this method causes it to break!?
Code: Select all
Validate.NotExists(repo.BTIA2.Form1.BtnCancel);
Code: Select all
while (btnNotExists == false) {
//Check if button is still there
btnNotExists = Validate.NotExists(repo.BTIA2.Form1.BtnCancel, 5000, "{0}", false);
}
I can't see what the problem is given that the possible overloads for this method are:Argument 1: cannot convert from 'Ranorex.InputTag' to 'string' (CS1503)
Code: Select all
public static bool NotExists(RxPath path)
public static bool NotExists(RxPath path, Duration searchTimeout)
public static bool NotExists(RxPath path, Duration searchTimeout, string message)
public static bool NotExists(RxPath path, Duration searchTimeout, string message, Validate.Options options)