We are building a new experience for our SmartBear Community.
This site is now read-only. You can still browse and search as usual. Learn More
This site is now read-only. You can still browse and search as usual. Learn More
In WPF application I have two text box fields - first field property is a isReadOnly=False and second textbox has property isReadOnly=True. While recording a keyword tests in first field I enter some string, leave second as it is and then I hit save button.
When I try to replay that test texbox where it needs to be typed that string has been skipped and the value tried to enter that other field which property is isReadOnly=true. Test fails with explanation " Failed to enter text in edit box,since it is a read only".
Seems like ID's of those text fields are dynamic. Do you have any idea what to do with that.
Please help, I'm stuck and desperate :(
Hey Ryan, it seems like it is working,THANK YOU a lot! Now it recognises the field properly!
So for others havng this problem in future:
- Use Find Object in Keywordtests, select whole form containing that field (if you could use just form without that other textbox field it could be even faster), set class name and isReadOnly = False property, also dynamic field needed to be either with wildcards or moved under most stable parent (with extended find), and used method Keys (setText didnt work for whatever reason it is)
var arProperties = ["ReadOnly","Name"];//or some other property besides Name
var arValues = [false,"*myTextBoxName*"];
var myTextBox = myFormParentObject.Find(arProperties,arValues,true,5000);
myTextBox.Keys("somekeysiwanttotype");
Hi Ryan and thank you for giving me some tips!
Yeah, all other properties are same ,execpt for isReadOnly. So I tried with your example (but in keyword test, since I'm not so familiar still with coding stuff etc).
In FindObject I entered a textbox class name property and isReadOnly=false property. It didnt found any methods under it, so I guessed that some other stuff is going on - I got an error message Alias. ... .parentObject of textbox cannot be found.
What to do with that...?? Do you have any idea?