OKWLocator extends OKWLocatorBase { public String getLocator() { myLogger.LogFunctionStartDebug( "getLocator()" ); String lvsReturn = ""; if ( _Locators != null ) { ST st = new ST( _locator, '$', '$' ); Integer i = 1; for ( OKWLocatorBase Locator : _Locators ) { st.add( "L" + i.toString(), Locator.getLocator() ); i++; } lvsReturn = st.render(); } else { lvsReturn = _locator; } myLogger.LogFunctionEndDebug( lvsReturn ); return lvsReturn; } OKWLocator(  );  OKWLocator( String fpsLocator, OKWLocatorBase... fpLocators ); String getLocator(); void setLocator( String fpsLocator, OKWLocatorBase... fpLocators ); @Override void setLocators( OKWLocatorBase... fpLocators ); @Override void copyLocator( OKWLocatorBase fpSource ); @Override String getlocator(); @Override OKWLocatorBase[] getLocators();  }
@Test public void TC_Kombiniert_2in1_Multiple() { OKWLocator L1 = new OKWLocator( "L1" ); OKWLocator L2 = new OKWLocator( "L2" ); OKWLocator Locator = new OKWLocator( "L2=$L2$, L1=$L1$, L2=$L2$, L1=$L1$", L1, L2 ); assertEquals( "L1", L1.getLocator() ); assertEquals( "L2", L2.getLocator() ); assertEquals( "L2=L2, L1=L1, L2=L2, L1=L1", Locator.getLocator() ); }
@Test public void TC_Kombiniert_2in1_ReverseOrder() { OKWLocator L1 = new OKWLocator( ">Locator1<" ); OKWLocator L2 = new OKWLocator( ">Locator2<" ); OKWLocator Locator_Summe = new OKWLocator( "Locator2=$L2$ assertEquals( "Locator2=>Locator2< }
@Test public void TC_Kombiniert_2in1() { OKWLocator L1 = new OKWLocator( ">Locator1<" ); OKWLocator L2 = new OKWLocator( ">Locator2<" ); OKWLocator Locator_Summe = new OKWLocator( "Locator1=$L1$ assertEquals( "Locator1=>Locator1< }
@Test public void TC_Window() { OKWLocator L1 = new OKWLocator( ">Locator1<" ); assertEquals( ">Locator1<", L1.getLocator() ); }
@Test public void TC_Window_Child() { OKWLocator Window = new OKWLocator( "Window" ); OKWLocator Child = new OKWLocator( "$L1$.Child", Window ); assertEquals( "Window.Child", Child.getLocator() ); assertEquals( "Window", Window.getLocator() ); }