Interface PageArea

All Superinterfaces:
CapybaraPortingLayer, Control.Owner
All Known Subinterfaces:
BuildStep, PostBuildStep, Step
All Known Implementing Classes:
AbstractDashboardViewPortlet, AbstractListViewColumn, AbstractStep, ActiveDirectorySecurityRealm, AggregateDownstreamTestResults, AntBuildStep, AntInstallation, ArtifactArchiver, ArtifactManagement, ArtifactManagement.Factory, ArtifactoryGlobalConfig, ArtifactoryGlobalConfig.Server, ArtifactoryGradleConfiguratior, ArtifactoryPublisher, AuditTrailGlobalConfiguration, AuthorizationStrategy, Axis, BaseStandardCredentials, BatchCommandBuildStep, BranchSource, BreadCrumbs, BuildAccessControl, BuildDescriptionSetter, BuildExecutorStatus, BuildParameters, BuildStatisticsPortlet, BuildTimeout, BuildTrigger, BuildTriggerConfig, BuildWrapper, Cloud, CoberturaPublisher, CodeMirror, ColumnsArea, CommandSlaveLauncher, CompressingArtifactManager, ComputerConnector, ComputerLauncher, CopyArchivedArtifactsBuildStep, CopyArtifactBuildStep, Credential, CredentialsBinding, DashboardPortlets, DeployPublisher, DiskUsageGlobalConfig, DockerBuildStep, DockerCommand, DockerCommand.CreateContainer, DockerCommand.CreateImage, DockerCommand.RemoveContainers, DockerCommand.StartContainers, Domain, EmailExtPublisher, EnvInjectConfig, EnvInjectConfig.Environment, EnvInjectConfig.Property, EnvInjectStep, ExternalGlobalConfig, ExternalNodeConfig, FileBuildParameters, FileCredentials, Fingerprint, GitblitScm, GitBranchSource, GithubBranchSource, GitLabBranchSource, GitLabPersonalAccessTokenCredential, GitLabScm, GitLabServerConfig, GitScm, GitScm.AdvancedCheckout, GitScm.AdvancedClone, GitScm.Behaviour, GitScm.CalculateChangelog, GitScm.CheckoutToLocalBranch, GitScm.CheckoutToLocalDir, GitScm.CleanAfterCheckout, GitScm.CleanBeforeCheckout, GitScm.CommitAuthorInChangelog, GitScm.CreateTagForBuild, GitScm.CustomNameAndMail, GitScm.CustomSCMName, GitScm.ForcePollingUsingWorkspace, GitScm.GitLfsPull, GitScm.MergeBeforeBuild, GitScm.NoBuildOnCommit, GitScm.PollingIgnoresMessage, GitScm.PollingIgnoresPath, GitScm.PollingIgnoresUser, GitScm.PruneStableRemoteBranches, GitScm.RecursiveSubmodules, GitScm.SparseCheckoutPaths, GitScm.StrategyToChooseBuild, GitScm.WipeAndForceClone, GlobalConfig, GlobalDockerConfig, GlobalPluginConfiguration, GradleInstallation, GradleStep, GroovyInstallation, GroovyPostBuildStep, GroovyStep, HtmlPublisher, HtmlPublisher.Report, JabberGlobalConfig, JabberGlobalConfig.AdvancedConfig, JabberGlobalConfig.EnabledConfig, JabberGlobalConfig.MUCConfig, JabberPublisher, JabberPublisher.Publishers, JacocoPublisher, JavadocPublisher, JdkInstallation, JenkinsDatabaseSecurityRealm, JGitInstallation, JiraGlobalConfig, JiraUpdater, JobDslBuildStep, JobFiltersArea, JobsGridPortlet, JUnitPublisher, LabelAxis, LabelExpressionAxis, LabelParameter, LastConsoleColumn, LatestBuildsPortlet, LdapGroupMembershipStrategy, LdapSecurityRealm, LdapSecurityRealm_Pre1_10, LoggedInAuthorizationStrategy, LogParserGlobalConfig, LogParserPublisher, Mailer, MailerGlobalConfig, MainArea, MainPanel, MatrixAuthorizationStrategy, MatrixRow, MavenBuildStep, MavenInstallation, MavenProjectConfig, MockSecurityRealm, MSBuildInstallation, MSBuildStep, MSTestRunnerBuildStep, NodeParameter, OnlineStatusNotification, PageAreaImpl, Parameter, ParameterizedTrigger, ParseUserAttributeLdapGroupMembershipStrategy, PasswordParameter, PhabricatorScm, PostBuildScript, PriorityConfig.Group, ProjectBasedMatrixAuthorizationStrategy, ProjectDefaultBuildAccessControl, ProjectDescriptionSetter, ProjectMatrixProperty, ProjectStatusStdJobList, Rvm, Scm, ScmPolling, SearchForGroupsLdapGroupMembershipStrategy, SecretFileCredentialsBinding, SecretStringCredentialsBinding, SecurityRealm, ServerCredentialMapping, ServletSecurityRealm, ShellBuildStep, SshCredentialDialog, SshPrivateKeyCredential, SshPrivateKeyCredential.Direct, SshSlaveConnector, SshSlaveLauncher, StageView, StringCredentials, StringParameter, SubversionScm, SystemGroovyStep, TestStatisticsChartPortlet, TextAxis, TextFinderPublisher, TextParameter, TimerTrigger, TimstamperGlobalConfig, ToolInstallation, Trigger, TriggerCallBuildStep, TriggerConfig, UnstableJobsPortlet, UpstreamJobTrigger, UserPwdCredential, ViewgitScm, WorkflowGithubSharedLibrary, WorkflowSharedLibrary, WorkflowSharedLibraryGlobalConfig, WsCleanup, WsCleanup.PostBuild, WsCleanup.PreBuild, XUnitPublisher, XUnitPublisher.Tool, XvncGlobalJobConfig, XvncJobConfig

public interface PageArea extends CapybaraPortingLayer, Control.Owner
Author:
christian.fritz
  • Method Details

    • path

      org.openqa.selenium.By path(String rel)
      Returns the "path" selector that finds an element by following the form-element-path plugin.

      form-element-path-plugin

      Specified by:
      path in interface Control.Owner
    • control

      Control control(String... relativePaths)
      Create a control object that wraps access to the specific INPUT element in this page area.

      The Control object itself can be created early as the actual element resolution happens lazily. This means PageArea implementations can put these in their fields.

      Several paths can be provided to find the first matching element. Useful when element path changed between versions.

    • control

      Control control(org.openqa.selenium.By selector)
    • self

      org.openqa.selenium.WebElement self()
      Returns WebElement that corresponds to the element that sits at the root of the area this object represents.
    • getPath

      String getPath()
    • getPath

      String getPath(String rel)
    • getPath

      String getPath(String rel, int index)
    • getPage

      PageObject getPage()
    • createPageArea

      @NonNull String createPageArea(String name, Runnable action) throws org.openqa.selenium.TimeoutException
      Capture path attribute of newly created form chunk upon invoking action.

      Consider "Add" button in page area with path "/foo" that is supposed to create new page area with path "/foo/bar" or "/foo/bar[n]". There are several problems with the straightforward approach: - Created area may or may not be the first one of its kind so figuring the "path" is nontrivial. - The area may can take a while to render so waiting is needed. - Even after the markup appears, it can take a while for "path" attribute is added.

      This method properly wait until the new path is known. To be used as:

       
        String barPath = fooArea.createPageArea("bar", () -> control("add-button").click());
        new FooBarArea(fooArea, barPath);
        
        
      Parameters:
      name - Name of the surrounding div which will the next segment in path. Given the area is "/builder" and we are about to construct /builder/shell[3], the relative prefix is "shell".
      action - An action that triggers the page area creation. Clicking the button, etc.
      Returns:
      The surrounding path of the area, exception thrown when not able to find out.
      Throws:
      org.openqa.selenium.TimeoutException