3 import static org.junit.Assert.*;
5 import org.junit.FixMethodOrder;
7 import okw.OKW_Memorize_Sngltn;
9 import okw.exceptions.OKWFrameObjectMethodNotImplemented;
10 import okw.exceptions.OKWVerifyingFailsException;
12 import org.junit.Ignore;
13 import org.junit.Rule;
14 import org.junit.Test;
15 import org.junit.rules.TestName;
16 import org.junit.runners.MethodSorters;
25 @FixMethodOrder( MethodSorters.NAME_ASCENDING )
28 String cvOKWObject =
"Link" +
"";
32 protected static String ApplicationName;
35 public TestName name =
new TestName();
39 public void TC_ClickOn()
throws Exception
44 EN.
TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
56 public void TC_LogCaption()
throws Exception
61 EN.
TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
73 public void TC_LogLabel()
throws Exception
78 EN.
TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
90 public void TC_LogValue()
throws Exception
95 EN.
TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
116 EN.
TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
136 EN.
TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
145 @Test(expected= UnsupportedOperationException.class)
155 public
void tcLogIsActive_en() throws Exception
160 EN.
TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
169 @Test(expected= UnsupportedOperationException.class)
179 public
void tcMemorizeIsActive_en() throws Exception
184 EN.
TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
193 @Test(expected= UnsupportedOperationException.class)
203 public
void tcVerifyIsActive_UnsupportedOperationException() throws Exception
208 EN.
TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
228 EN.
TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
241 public void TC_MemorizeCaption() throws Exception
246 EN.
TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
250 assertEquals(
"Google...", myMM.
get(
"SeLink_MemorizeCaption_1" ) );
253 assertEquals(
"Yahoo...", myMM.
get(
"SeLink_MemorizeCaption_1" ) );
261 public void TC_MemorizeLabel() throws Exception
266 EN.
TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
270 assertEquals(
"Label Google:", myMM.
get(
"SeLink_MemorizeLabel_1" ) );
273 assertEquals(
"Label Yahoo:", myMM.
get(
"SeLink_MemorizeLabel_1" ) );
281 public void TC_MemorizeValue() throws Exception
283 EN.BeginTest( name.getMethodName() );
285 EN.StartApp( ApplicationName );
286 EN.TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
288 EN.SelectWindow(
"Link" );
289 EN.MemorizeValue(
"Google",
"SeLinkMemorizeValue1" );
292 EN.TypeKey(
"URL",
"${SeLinkMemorizeValue1}" );
294 EN.VerifyValueWCM(
"URL",
"https://www.google.de*" );
296 EN.StopApp( ApplicationName );
310 EN.
TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
314 assertEquals(
"YES", myMM.
get(
"SeLink_MemorizeExists_1" ) );
317 assertEquals(
"YES", myMM.
get(
"SeLink_MemorizeExists_1" ) );
320 assertEquals(
"NO", myMM.
get(
"SeLink_MemorizeExists_1" ) );
335 EN.
TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
339 assertEquals(
"NO", myMM.
get(
"SeLink_MemorizeHasFocus" ) );
343 assertEquals(
"YES", myMM.
get(
"SeLink_MemorizeHasFocus" ) );
358 EN.
TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
362 assertEquals(
"Title: Google", myMM.
get(
"SeLink_MemorizeTooltip_1" ) );
365 assertEquals(
"Title: Yahoo", myMM.
get(
"SeLink_MemorizeTooltip_1" ) );
373 public void TC_SetFocus_VerifyHasFocus() throws Exception
378 EN.
TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
397 public void TC_VerifyCaption() throws Exception
402 EN.
TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
414 public void TC_VerifyCaptionWCM() throws Exception
416 EN.BeginTest( name.getMethodName() );
418 EN.StartApp( ApplicationName );
419 EN.TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
421 EN.SelectWindow(
"Link" );
422 EN.VerifyCaptionWCM(
"Google",
"Google???" );
423 EN.VerifyCaptionWCM(
"Yahoo",
"Yahoo???" );
425 EN.StopApp( ApplicationName );
431 public void TC_VerifyCaptionREGX() throws Exception
433 EN.BeginTest( name.getMethodName() );
435 EN.StartApp( ApplicationName );
436 EN.TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
438 EN.SelectWindow(
"Link" );
439 EN.VerifyCaptionREGX(
"Google",
"Google\\W{3}" );
440 EN.VerifyCaptionREGX(
"Yahoo",
"Yahoo\\W{3}" );
442 EN.StopApp( ApplicationName );
448 public void TC_VerifyLabel() throws Exception
450 EN.BeginTest( name.getMethodName() );
452 EN.StartApp( ApplicationName );
453 EN.TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
455 EN.SelectWindow(
"Link" );
456 EN.VerifyLabel(
"Google",
"Label Google:" );
457 EN.VerifyLabel(
"Yahoo",
"Label Yahoo:" );
459 EN.StopApp( ApplicationName );
465 public void TC_VerifyLabelWCM() throws Exception
467 EN.BeginTest( name.getMethodName() );
469 EN.StartApp( ApplicationName );
470 EN.TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
472 EN.SelectWindow(
"Link" );
473 EN.VerifyLabelWCM(
"Google",
"Label Google?" );
474 EN.VerifyLabelWCM(
"Yahoo",
"Label Yahoo?" );
476 EN.StopApp( ApplicationName );
482 public void TC_VerifyLabelREGX() throws Exception
484 EN.BeginTest( name.getMethodName() );
486 EN.StartApp( ApplicationName );
487 EN.TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
489 EN.SelectWindow(
"Link" );
490 EN.VerifyLabelREGX(
"Google",
"Label Google:" );
491 EN.VerifyLabelREGX(
"Yahoo",
"Label Yahoo:" );
493 EN.StopApp( ApplicationName );
499 public void TC_VerifyValue() throws Exception
501 EN.BeginTest( name.getMethodName() );
503 EN.StartApp( ApplicationName );
504 EN.TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
506 EN.SelectWindow(
"Link" );
507 EN.VerifyValue(
"Google",
"http://www.google.de/" );
508 EN.VerifyValue(
"Yahoo",
"http://www.yahoo.de/" );
510 EN.StopApp( ApplicationName );
516 public void TC_VerifyValueWCM() throws Exception
518 EN.BeginTest( name.getMethodName() );
520 EN.StartApp( ApplicationName );
521 EN.TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
523 EN.SelectWindow(
"Link" );
524 EN.VerifyValueWCM(
"Google",
"http?//www.google.de*" );
525 EN.VerifyValueWCM(
"Yahoo",
"http?//www.yahoo.de*" );
527 EN.StopApp( ApplicationName );
533 public void TC_VerifyValueREGX() throws Exception
535 EN.BeginTest( name.getMethodName() );
537 EN.StartApp( ApplicationName );
538 EN.TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
540 EN.SelectWindow(
"Link" );
541 EN.VerifyValueREGX(
"Google",
"http\\W//www.google.de.*" );
542 EN.VerifyValueREGX(
"Yahoo",
"http\\W//www.yahoo.de.*" );
544 EN.StopApp( ApplicationName );
561 EN.
TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
579 public
void TC_VerifyExists_NO_YesObject() throws Exception
584 EN.
TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
604 EN.
TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
621 public
void TC_VerifyExists_YES_NoObject() throws Exception
627 EN.
TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
637 public void TC_VerifyToolTip() throws Exception
642 EN.
TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
653 public void TC_VerifyToolTipWCM() throws Exception
658 EN.
TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
669 public void TC_VerifyToolTipREGX() throws Exception
671 EN.BeginTest( name.getMethodName() );
673 EN.StartApp( ApplicationName );
674 EN.TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
676 EN.SelectWindow(
"Link" );
677 EN.VerifyTooltipREGX(
"Google",
"Title\\W Google" );
678 EN.VerifyTooltipREGX(
"Yahoo",
"Title\\W Yahoo" );
680 EN.StopApp( ApplicationName );
683 @Test(expected= OKWFrameObjectMethodNotImplemented.class)
693 public
void tcDoubleClickOn_en() throws Exception
698 EN.
TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
718 public
void tcSetValue_OKWFrameObjectMethodNotImplemented() throws Exception
723 EN.
TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
742 public
void tcSelect_OKWFrameObjectMethodNotImplemented() throws Exception
747 EN.
TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
767 public
void tcSelectMenu2_OKWFrameObjectMethodNotImplemented() throws Exception
772 EN.
TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
791 public
void tcSelectMenu_OKWFrameObjectMethodNotImplemented() throws Exception
796 EN.
TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );
806 @Test(expected= UnsupportedOperationException.class)
816 public
void tcTypeKey_UnsupportedOperationException() throws Exception
821 EN.
TypeKey(
"URL",
"http://test.openkeyword.de/Link/Link.htm" );