- the "Page.Something" - part is known.
- I want to use it as a <Ranorex.Text> object and use it, i.e. changing the text for this textbox, like
Code: Select all
t.Element.SetAttributeValue("Text", "123");
Thansks in advance!
Code: Select all
t.Element.SetAttributeValue("Text", "123");
Code: Select all
public void YourMethod(Ranorex.Adapter repoItem)
{
repoItem.Element.SetAttributeValue("Text", "123");
}
Code: Select all
index = 14;
...
string xpath = @"/form[...]//" + index + "/....";
Ranorex.Text txt = null;
bool found = Host.Local.TryFindSingle<Ranorex.Text>(xpath, 2000, out txt);
Code: Select all
"if (param == "Textbox1") {click on Repo.Textbox1}"
"if (param == "Textbox2") {click on Repo.Textbox2}"
"if (param == "Textbox3") {click on Repo.Textbox3}"
"if (param == "Textbox4") {click on Repo.Textbox4}"
...
Code: Select all
var elementsInFolder = repo.Editor.SelfInfo.Children;
foreach(var el in elementsInFolder)
{
string elStr = el.ToString();
elStr = elStr.Substring(elStr.LastIndexOf('.') +1 , elStr.Length - elStr.LastIndexOf('.') -1);
if(elStr == controlName)
{
Ranorex.Text t = ".//" + el.Path.ToString();
t.Element.SetAttributeValue("text", "Land der Berge, Land am Strome...");
}
}