Hi,
Is it possible to speed up the filling in of a Webform with Ranorex? If it is, can you please tell me how?
Regards
Konstantin Todor
Speed up filling in a Webform
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Speed up filling in a Webform
Hi,
There are a few possibilities:
* You can directly set the values on input tags (e.g. text boxes, myTextBox.Value = "yourvalue";)
* Otherwise, when using the Keyboard you can reduce the Keyboard.KeyPressTime (see this forum thread)
* If you are using Recorder, you can reduce the Durations on each item to a low value or zero; or use Turbo Mode
* Make sure that the Ranorex IE addin is enabled, and that IE Protected Mode is turned off (requires reboot)
Michael
Ranorex Team
There are a few possibilities:
* You can directly set the values on input tags (e.g. text boxes, myTextBox.Value = "yourvalue";)
* Otherwise, when using the Keyboard you can reduce the Keyboard.KeyPressTime (see this forum thread)
* If you are using Recorder, you can reduce the Durations on each item to a low value or zero; or use Turbo Mode
* Make sure that the Ranorex IE addin is enabled, and that IE Protected Mode is turned off (requires reboot)
Michael
Ranorex Team
Re: Speed up filling in a Webform
That means when i have a repository item for a inputbox i can set the value by usercode?
For example:
Or is this incorrect? (Sorry I am not a big fan of C#)
For example:
Code: Select all
//First I define the Repository:
WebTestRepository input = WebTestRepository.Instance;
//And then I select the Item and set the value:
input.Form.Lastname.Value="test";
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Speed up filling in a Webform
You can use the SetValue action in Recorder (just drag the repository item to the action list and select "set value").
The code looks quite ok. If you have an appfolder with name "MyWebsite" and a folder named "Form" with an input tag "LastName" then the code looks like this:
Cheers,
Michael
The code looks quite ok. If you have an appfolder with name "MyWebsite" and a folder named "Form" with an input tag "LastName" then the code looks like this:
var repo = WebTestRepository.Instance; repo.MyWebsite.Form.LastName.Value = "Blub";You might also want to have a look at the generated code-behind.
Cheers,
Michael
Re: Speed up filling in a Webform
Thank you for your quick and good advice 

Re: Speed up filling in a Webform
I now have a problem concerning the valuesetting. I tried it as you said by dragging the repository item to the action list. I set the value on every single item but it did not fill anything in. The Paths are 100% correct and I dont get it, why it wouldn't work.
Edit: The Variables are working too.
Code: Select all
try {
Report.Log(ReportLevel.Info, "Set Value", "(Optional Action)\r\nSetting
attribute text to '$Companyname' on item 'Servicedesk.Form.Companyname'.",
repo.Servicedesk.Form.CompanynameInfo, new RecordItemIndex(3));
repo.Servicedesk.Form.Companyname.Element.SetAttributeValue("text",
Companyname);
}
catch(Exception ex) {
Report.Warn("(Optional Action) " + ex.Message);
}
try {
Report.Log(ReportLevel.Info, "Set Value", "(Optional Action)\r\nSetting
attribute text to '$Department' on item 'Servicedesk.Form.Department'.",
repo.Servicedesk.Form.DepartmentInfo, new RecordItemIndex(4));
repo.Servicedesk.Form.Department.Element.SetAttributeValue("text",
Department);
}
catch(Exception ex) {
Report.Warn("(Optional Action) " + ex.Message);
}
try {
Report.Log(ReportLevel.Info, "Set Value", "(Optional Action)\r\nSetting
attribute text to '$Telephonenumber' on item 'Servicedesk.Form.Telephonenumber'.",
repo.Servicedesk.Form.TelephonenumberInfo, new RecordItemIndex(5));
repo.Servicedesk.Form.Telephonenumber.Element.SetAttributeValue("text",
Telephonenumber);
}
catch(Exception ex) {
Report.Warn("(Optional Action) " + ex.Message);
}
try {
Report.Log(ReportLevel.Info, "Set Value", "(Optional Action)\r\nSetting
attribute text to '$Faxnumber' on item 'Servicedesk.Form.Faxnumber'.",
repo.Servicedesk.Form.FaxnumberInfo, new RecordItemIndex(6));
repo.Servicedesk.Form.Faxnumber.Element.SetAttributeValue("text",
Faxnumber);
}
catch(Exception ex) {
Report.Warn("(Optional Action) " + ex.Message);
}
try {
Report.Log(ReportLevel.Info, "Set Value", "(Optional Action)\r\nSetting
attribute text to '$Email' on item 'Servicedesk.Form.Email'.",
repo.Servicedesk.Form.EmailInfo, new RecordItemIndex(7));
repo.Servicedesk.Form.Email.Element.SetAttributeValue("text", Email);
}
catch(Exception ex) {
Report.Warn("(Optional Action) " + ex.Message);
}
try {
Report.Log(ReportLevel.Info, "Set Value", "(Optional Action)\r\nSetting
attribute text to '$Adress' on item 'Servicedesk.Form.Adress'.",
repo.Servicedesk.Form.AdressInfo, new RecordItemIndex(8));
repo.Servicedesk.Form.Adress.Element.SetAttributeValue("text", Adress);
}
catch(Exception ex) {
Report.Warn("(Optional Action) " + ex.Message);
}
try {
Report.Log(ReportLevel.Info, "Set Value", "(Optional Action)\r\nSetting
attribute text to '$PLZ' on item 'Servicedesk.Form.PLZ'.",
repo.Servicedesk.Form.PLZInfo, new RecordItemIndex(9));
repo.Servicedesk.Form.PLZ.Element.SetAttributeValue("text", PLZ);
}
catch(Exception ex) {
Report.Warn("(Optional Action) " + ex.Message);
}
You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Speed up filling in a Webform
Hi,
Are you trying to set the text on a Container element or on a Text element?
Would it be possible to post us a Ranorex Snapshot of the entire grid?
How to create a Ranorex Snapshot
Did you read the User Guide already? If not I would suggest it, because we describe almost every functionality inside this Guide.
http://www.ranorex.com/support/user-guide-20.html
Regards,
Peter
Ranorex Team
If you execute your recording, do you get any error in your Report?Todor wrote:I now have a problem concerning the valuesetting. I tried it as you said by dragging the repository item to the action list. I set the value on every single item but it did not fill anything in. The Paths are 100% correct and I dont get it, why it wouldn't work.
Are you trying to set the text on a Container element or on a Text element?
Would it be possible to post us a Ranorex Snapshot of the entire grid?
How to create a Ranorex Snapshot
Did you read the User Guide already? If not I would suggest it, because we describe almost every functionality inside this Guide.
http://www.ranorex.com/support/user-guide-20.html
Regards,
Peter
Ranorex Team
Re: Speed up filling in a Webform
I have already fixed this problem. I used the User Code alternative. I have also already read your User guide 
