Hi,
I have the following code running on windows 2008 with IE browser an current ranorex version.
InputTag userName = gmsLogin.FindSingle(".//input[@id='UsernameMaskTextBox']");
userName.Value= "user1";
InputTag password = gmsLogin.FindSingle(".//input[@id='PasswordMaskTextbox']");
password.Value = "Apollo";
The problem I am running into is that the background text (watermark)of the input tags is being set.
So when I click the login button the page thinks there is no username and password entered.
Any ideas to get around this?
Thanks
setting text box value
Re: setting text box value
I would issue a click on the InputTags then type the name and password in rather than trying to set the value.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!
Ciege...
Ciege...
Re: setting text box value
Does the program just add your values to the existing values in the inputbox?chunkylover53 wrote:The problem I am running into is that the background text (watermark)of the input tags is being set.
If it does just do it like Ciege said:
Code: Select all
DivTag x = gmsLogin; // I assume that this is a DivTag if not just change it.
((InputTag)x.FindSingle(".//input[@id='UsernameMaskTextBox']")).Click();
((InputTag)x.FindSingle(".//input[@id='UsernameMaskTextBox']")).Value="user1";
((InputTag)x.FindSingle(".//input[@id='PasswordMaskTextboxTextBox']")).Click();
((InputTag)x.FindSingle(".//input[@id='PasswordMaskTextboxTextBox']")).Value="Apollo";
-
- Posts: 23
- Joined: Wed Oct 06, 2010 8:21 pm
Re: setting text box value
Hi,
I tried click(), click(new location()), and performclick().
None of them worked. Does it matter that these login controls might be silverlight?
I tried click(), click(new location()), and performclick().
None of them worked. Does it matter that these login controls might be silverlight?
Re: setting text box value
Normally not. I have worked on a silverlight platform and i haven't had any problems so far.
If the click() Method does not work are you sure that these two objects are found by ranorex (?), because that could be the problem. Can you post the full path to these two objects? maybee we can help you then
If the click() Method does not work are you sure that these two objects are found by ranorex (?), because that could be the problem. Can you post the full path to these two objects? maybee we can help you then
