if( page.TextFrames[i].Label = "test" )
Unless you really want to assign "test" to the label of everything, this is probably your problem.
But I don't know C#, so maybe I'm off-base here.
Really, all these C# questions...I don't think that's helping you get help in this forum.
Anyhow, the usual answer is .getElements(). Read up on it?