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
//First I define the Repository:
WebTestRepository input = WebTestRepository.Instance;
//And then I select the Item and set the value:
input.Form.Lastname.Value="test";
var repo = WebTestRepository.Instance; repo.MyWebsite.Form.LastName.Value = "Blub";
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);
}
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.
Users browsing this forum: No registered users and 1 guest