Hi Varada, It is possible to include custom logic within your script to replicate the required behavior, but you need to understand the XPath locator strings of the radio buttons prior to implementing. For example, using the example you provided, the pattern of your Xpath locator strings maybe Excellent - //INPUT[@id='autoquote:Type:0'], Good - //INPUT[@id='autoquote:Type:1'] etc, we could make use of the GetUserId function to ensure that User 1 selects a certain radio button, whilst 2 selects the other. The example script below will look to interact with elements based upon the User Id, so for example, the user with User Id 1 will click on the Radio button Excellent, whilst the virtual user with user id 2 will click on Good. dcltrans transaction TInit begin end TInit; transaction TMain var wnd1, i : number; begin i := GetUserId(); BrowserStart(BROWSER_MODE_DEFAULT, 744, 274); BrowserSetReplayBehavior(SP_15_5); wnd1 := BrowserGetActiveWindow("wnd1"); BrowserNavigate("C:\\inetpub\\wwwroot\\list.html"); ThinkTime(5.6); if i = 1 then BrowserRadioButtonSelect("//INPUT[@name='Excellent']"); else if i = 2 then BrowserRadioButtonSelect("//INPUT[@name='Good']"); end; end; end TMain; Hopefully this helps out. Regards Paul
↧