@Test public void login_form_scripted() { TestWebScanAdapterConfig x = new TestAbstractWebScanAdapterConfigBuilder(). login(). form().script(). addStep("input").select("#user_id").enterValue("user1").endStep(). addStep("input").select("#pwd_id").enterValue("pwd1").endStep(). addStep("click").select("#login_butotn_id").enterValue(null).endStep(). endLogin() .build(); assertNotNull(x); LoginConfig config = x.getLoginConfig(); assertNotNull(config); assertTrue(null, config.isFormScript()); List<LoginScriptStep> steps = config.asFormScript().getSteps(); assertNotNull(steps); assertEquals(3,steps.size()); Iterator<LoginScriptStep> it = steps.iterator(); LoginScriptStep step = it.next(); assertTrue(step.isInput()); assertFalse(step.isClick()); assertEquals("user1",step.getValue()); assertEquals("#user_id",step.getSelector()); step = it.next(); assertTrue(step.isInput()); assertFalse(step.isClick()); assertEquals("pwd1",step.getValue()); assertEquals("#pwd_id",step.getSelector()); step = it.next(); assertFalse(step.isInput()); assertTrue(step.isClick()); assertEquals("#login_butotn_id",step.getSelector()); assertEquals(null,step.getValue()); }
public LoginBuilder login() { currentLoginBuilder=new LoginBuilder(); return currentLoginBuilder; }
AbstractWebScanAdapterConfigBuilder extends AbstractAdapterConfigBuilder<B,C> { public LoginBuilder login() { currentLoginBuilder=new LoginBuilder(); return currentLoginBuilder; } }
AbstractWebScanAdapterConfigBuilder extends AbstractAdapterConfigBuilder<B,C> { public LoginBuilder login() { currentLoginBuilder=new LoginBuilder(); return currentLoginBuilder; }  }
AbstractWebScanAdapterConfigBuilder extends AbstractAdapterConfigBuilder<B,C> { public LoginBuilder login() { currentLoginBuilder=new LoginBuilder(); return currentLoginBuilder; }  LoginBuilder login(); }
AbstractWebScanAdapterConfigBuilder extends AbstractAdapterConfigBuilder<B,C> { public LoginBuilder login() { currentLoginBuilder=new LoginBuilder(); return currentLoginBuilder; }  LoginBuilder login();  }