i'm facing a problem that i store some repoItems (RadioButtons etc.) in a Tuple set, that will provide some configuration that i have to perform on the UI.
Code: Select all
Tuple<RadioButton, RadioButton, RadioButton>[] configuration =
{
//Configurations
new Tuple<RadioButton, RadioButton, RadioButton>( ..repoItem.RadioButton1, repoItem.RadioButton2, repoItem.RadioButton3 ),
...
}
RepoPath of the RadioButtons are like:
../element[@automationid='xyz' and @visible='True']/radiobutton[@automationid='xyz']
Code: Select all
TestCode:
for( int i = 0; i < topoLabelSet.Length; i++ )
{
...
Mouse.Click(configuration[ i ].Item1.Element);
Mouse.Click(configuration[ i ].Item2.Element);
Mouse.Click(configuration[ i ].Item3.Element);
...
}
No i'm facing the problem, that in the created Tuple-Array the e.g. repoItem.RadioButton1 still points to an element/location that was valid at the time the TupleArray was created.
But in my next for-loop-iteration the position/location of the RadioButton1 has changed and this changed wasn't recognized and if i click on the RadioButton1 still the position of the first RadioButton1 is stored.
And exactly the visibility check of the XPath of the RadioButton
../element[@automationid='xyz' and @visible='True']/radiobutton[@automationid='xyz']
should lead to an other valid RadioButton1.
So my problem is, that the Element that was stored in the Tuple-Array needs to be updated but i can not find or just don't know how to update the Repo Element.
Any suggestions?
kind regards,
Markus