Package net.sf.sahi.client

Examples of net.sf.sahi.client.ElementStub


                                                        String locator,
                                                        Integer position,
                                                        String parentType,
                                                        String parentLocator,
                                                        Integer parentPosition ) throws Throwable {
    ElementStub parent = find( parentType, parentLocator, parentPosition );

    if ( exists( parent ) ) {
      // If parent doesn't exist, then the element will not be found and that's the same as not visible
      ElementStub stub = find( type, locator, position, parent );
      assertFalse( isVisible( stub ) );
    }
  }
View Full Code Here


    }
  }

  @And("^" + StandardSahiSteps.ELEMENT_REGEX + " (?:does not|should not) exist$")
  public void element_does_not_exist( String type, String locator, Integer position ) throws Throwable {
    ElementStub stub = find( type, locator, position );
    assertFalse( exists( stub ) );
  }
View Full Code Here

    LOG.debug( "Waiting for {}{} to " + successMessage, descriptor, parent != null ? " in " + parent : "" );

    do {
      if ( parent != null ) {
        ElementStub parentStub = elementHandleService.find( parent );

        if ( exists( parentStub ) ) {
          descriptor.setParent( parentStub );
          status = checkVisibility ? isVisible( elementHandleService.find( descriptor ) ) : exists(
              elementHandleService.find( descriptor ) );
View Full Code Here

  }

  @Override
  public ElementStub find( ElementDescriptor descriptor ) {
    if ( StringUtils.equalsIgnoreCase( descriptor.getType(), TYPE ) ) {
      return addParents( new ElementStub( CwbElementStub.HEADING, browser, descriptor.getSahiArguments() ), descriptor );
    }
    else {
      // Specific heading with id
      return addParents( new ElementStub( descriptor.getType(), browser, descriptor.getSahiArguments() ),
                         descriptor );
    }
  }
View Full Code Here

    throw new RuntimeException( "Set impossible on " + descriptor );
  }

  @Override
  public void verify( ElementDescriptor descriptor, boolean expectedOutcome ) {
    ElementStub element = find( descriptor );
    assertEquals( expectedOutcome,
                  executeOperation( element.getText(), descriptor.getValue(), descriptor.getOperation() ) );
  }
View Full Code Here

    return addParents( browser.hidden( descriptor.getSahiArguments() ), descriptor );
  }

  @Override
  public void set( ElementDescriptor descriptor ) {
    ElementStub element = find( descriptor );
    element.setValue( descriptor.getValue() );
  }
View Full Code Here

    element.setValue( descriptor.getValue() );
  }

  @Override
  public void verify( ElementDescriptor descriptor, boolean expectedOutcome ) {
    ElementStub element = find( descriptor );
    assertEquals( expectedOutcome,
                  executeOperation( element.getValue(), descriptor.getValue(), descriptor.getOperation() ) );
  }
View Full Code Here

    return StringUtils.startsWithIgnoreCase( descriptor.getType(), TYPE );
  }

  @Override
  public ElementStub find( ElementDescriptor descriptor ) {
    return addParents( new ElementStub( CwbElementStub.TEXTBOX, browser, descriptor.getSahiArguments() ), descriptor );
  }
View Full Code Here

    return addParents( new ElementStub( CwbElementStub.TEXTBOX, browser, descriptor.getSahiArguments() ), descriptor );
  }

  @Override
  public void set( ElementDescriptor descriptor ) {
    ElementStub element = find( descriptor );
    element.setValue( descriptor.getValue() );
  }
View Full Code Here

    element.setValue( descriptor.getValue() );
  }

  @Override
  public void verify( ElementDescriptor descriptor, boolean expectedOutcome ) {
    ElementStub element = find( descriptor );
    assertEquals( expectedOutcome,
                  executeOperation( element.getValue(), descriptor.getValue(), descriptor.getOperation() ) );
  }
View Full Code Here

TOP

Related Classes of net.sf.sahi.client.ElementStub

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.