Forum Discussion
Hello Robert
I tried recording but it didn't help. Here is the record code.
function Test1()
{
var panel;
var textbox;
Browsers.Item(btChrome).Navigate("https://qa1-payrollplussuite.castandcrew.com/offers/4508/onboarding/profile");
panel = Aliases.browser.pageQa1PayrollplussuiteCastandcr.form.panel.panel.panel.panel.panel;
textbox = panel.panel.panel.textboxSocialSecurity;
textbox.Click(23, 16);
textbox.SetText("");
textbox.Click(12, 19);
textbox.SetText("45");
textbox.Click(13, 16);
textbox.SetText("6789");
textbox = panel.textboxAlternateEmployeeId;
textbox.Click(36, 12);
textbox.SetText("1234");
}I try to stay away from TC name mapping or anything that will limit the code (as much as possible). I use XPat throughout.
The SSN input boxes are designed in such way that as soon as user enters 3 digits in box 1, it shifts focus to box 2. As soon as user enters 2 digits here, it transfers focus to box 3.
I came up with this unintelligent code.
var btnSSN1 = page.FindChildByXPath("//input[1][@id='ssn_mask']");
var btnSSN2 = page.FindChildByXPath("//input[2][@id='ssn_mask']");
var btnSSN3 = page.FindChildByXPath("//input[3][@id='ssn_mask']");
btnSSN1.SetText(strOne);
Delay(500);
btnSSN2.SetText(strTwo);
Delay(500);
btnSSN3.SetText(strThree);
Delay(500);
But that (semi) solved the SSN issue only. I have all kinds of challenges in this form ( and I have 4 of them.. :) )
For example; I am still baffled why I cannot click a dropdown list box and select an item via automation. I will not stay open for the script to select the option.
Hi,
You have provided the Object Browser properties for the parent element of your combobox:
...however you should investigate its child. Are they presented as TextNodes?