I have a recording module, where I added a step as "User Code". So this code is now part of the recording module and cannot be used in another recording module, right ?
Now another recording module requires this with a different repo item to work on.
My user code looks currently like this
public void Validate_ChatTextValue(string argument1) { Report.Log(ReportLevel.Info, "Validation", "Validating", repo.project.ChatTextValueInfo); var cValue = repo.project.ChatTextValue.InnerText.Trim(); for (int i = 0; i < 25; i++) { if (String.Equals(cValue, argument1)) { return; } Delay.Milliseconds(1000); cValue = repo.project.ChatTextValue.InnerText.Trim(); } Report.Log(ReportLevel.Failure, "Validation", "Chat element is wrong", repo.project.ChatTextValueInfo); }to check whether an element has a certain innerText.
Now I like to generalise this, in the way that
a) other recording modules can use this
b) the method takes also the repo item as argument
Can someone help me how to do this ?