Unable to use TestObject.find method for setting the password field and also clicking the submit button
Hello All,
I am using RFT 8.2 and the IE version is 8.
I have a simple HTML Form application which has a Username,Password and Submit field.
I am using the following coding mechasim to set the value of the username and password field and then click on the Submit button.
TestObject[] uname =find(atDescendant(".id","un",".name","your_name"));
TextGuiTestObject txtuser = (TextGuiTestObject)uname[0];
txtuser.setText("user");
txtuser.unregister();
TestObject[] pwd =find(atDescendant(".id","pwd",".name","your_pwd"));
TextGuiTestObject txtpwd = (TextGuiTestObject)pwd[0];
txtpwd.setText("user1");
txtpwd.unregister();
TestObject[] submit = null;
GuiTestObject got = null;
submit =find(atDescendant(".name","submit"));
got = (GuiTestObject)submit[0];
got.click();
got.unregister();
Does anybody let me know where I am going wrong please since I am unable to set the password field and also not able to click on the submit button.
I am using RFT 8.2 and the IE version is 8.
I have a simple HTML Form application which has a Username,Password and Submit field.
I am using the following coding mechasim to set the value of the username and password field and then click on the Submit button.
TestObject[] uname =find(atDescendant(".id","un",".name","your_name"));
TextGuiTestObject txtuser = (TextGuiTestObject)uname[0];
txtuser.setText("user");
txtuser.unregister();
TestObject[] pwd =find(atDescendant(".id","pwd",".name","your_pwd"));
TextGuiTestObject txtpwd = (TextGuiTestObject)pwd[0];
txtpwd.setText("user1");
txtpwd.unregister();
TestObject[] submit = null;
GuiTestObject got = null;
submit =find(atDescendant(".name","submit"));
got = (GuiTestObject)submit[0];
got.click();
got.unregister();
Does anybody let me know where I am going wrong please since I am unable to set the password field and also not able to click on the submit button.