I have been away for a week so sorry about the delay in getting back to you, Im sorry to say that this new code doesnt seem to correct the probelm completely.
again if i search for a value on the first page the test locates and click it successfully but if i try and find something on the 2nd or 3rd page it just seems to ignore it and fails the test, it is however changing pages now, i can see the gridview changing from 1 > 2 > 3, but it never actually locate the string i am searching for.
[CodedStep(@"New Coded Step")]
public void WebTest_CodedStep()
int page = 1; //this is the number of the page.
bool notFound = true; //Indicates whether the element is found or not.
string search = "Clinical 12";
> myList = ActiveBrowser.Find.AllByTagName<
foreach (HtmlTableCell item in myList)
//Click, edit, verify
Log.WriteLine("I have found it");
notFound = false;
//if you need to find and click on the link
HtmlAnchor link = Find.ByExpression<
>("tagname=a","TextContent=" + search.ToString());
if (notFound == false)
// Find the link for the next page and click on it.
HtmlAnchor a = Find.ByExpression<
>("tagname=a", "InnerText=" + page);
I have attached a fiddler of the latest test.