net.serenitybdd.screenplay.abilities.BrowseTheWeb Java Examples

The following examples show how to use net.serenitybdd.screenplay.abilities.BrowseTheWeb. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ApplicationDetails.java    From serenity-documentation with Apache License 2.0 6 votes vote down vote up
@Override
public ApplicationInformation answeredBy(Actor actor) {
    String title = BrowseTheWeb.as(actor).getTitle();
    String heading = Text.of(MAIN_HEADING).viewedBy(actor).value();
    String aboutInformation = Text.of(FOOTER).viewedBy(actor).value();

    return new ApplicationInformation(title, heading, aboutInformation);
}
 
Example #2
Source File: CreateRepositoryInGitHubStepDefinition.java    From base_project_for_web_automation_projects with MIT License 5 votes vote down vote up
private void verifyIfDriverIsOpera() {
    if(OPERA.equals(System.getProperty("context"))){
        OperaOptions operaOptions = new OperaOptions();
        operaOptions.setBinary(System.getProperty("binary"));
        BrowseTheWeb.as(theActorCalled(CESAR)).setDriver(new OperaDriver(operaOptions));
    }
}
 
Example #3
Source File: AddNewTodos.java    From serenity-documentation with Apache License 2.0 5 votes vote down vote up
@Before
public void jamesCanBrowseTheWeb() {
    james.can(BrowseTheWeb.with(hisBrowser));
}
 
Example #4
Source File: Evaluate.java    From jenkins-build-monitor-plugin with MIT License 4 votes vote down vote up
public <T extends Actor> void performAs(T theUser) {
    ((JavascriptExecutor) BrowseTheWeb.as(theUser).getDriver()).executeScript(expression, parameters);
}
 
Example #5
Source File: GoogleSearchScreenplayLiveTest.java    From tutorials with MIT License 4 votes vote down vote up
@Before
public void setup() {
    kitty.can(BrowseTheWeb.with(browser));
}
 
Example #6
Source File: ShouldDisplayConcurrentBuilds.java    From jenkins-build-monitor-plugin with MIT License 4 votes vote down vote up
@Before
public void actorCanBrowseTheWeb() {
    dave.can(BrowseTheWeb.with(browser));
}
 
Example #7
Source File: ShouldDisplayBadgesAbstractBase.java    From jenkins-build-monitor-plugin with MIT License 4 votes vote down vote up
@Before
public void actorCanBrowseTheWeb() {
    paul.can(BrowseTheWeb.with(browser));
}
 
Example #8
Source File: ShouldTellWhatBrokeTheBuild.java    From jenkins-build-monitor-plugin with MIT License 4 votes vote down vote up
@Before
public void actorCanBrowseTheWeb() {
    dave.can(BrowseTheWeb.with(browser));
}
 
Example #9
Source File: ProjectStatusShouldBeEasyToDetermine.java    From jenkins-build-monitor-plugin with MIT License 4 votes vote down vote up
@Before
public void actorCanBrowseTheWeb() {
    anna.can(BrowseTheWeb.with(browser));
}
 
Example #10
Source File: ShouldDisplayPipelineStage.java    From jenkins-build-monitor-plugin with MIT License 4 votes vote down vote up
@Before
public void actorCanBrowseTheWeb() {
    donald.can(BrowseTheWeb.with(browser));
}
 
Example #11
Source File: ShouldSupportExternalProjects.java    From jenkins-build-monitor-plugin with MIT License 4 votes vote down vote up
@Before
public void actorCanBrowseTheWeb() {
    maggie.can(BrowseTheWeb.with(browser))
          .can(InteractWithJenkinsAPI.using(jenkins.client()));
}
 
Example #12
Source File: BuildMonitorShouldBeEasyToSetUp.java    From jenkins-build-monitor-plugin with MIT License 4 votes vote down vote up
@Before
public void actorCanBrowseTheWeb() {
    anna.can(BrowseTheWeb.with(browser));
}
 
Example #13
Source File: ShouldSupportCloudBeesFolders.java    From jenkins-build-monitor-plugin with MIT License 4 votes vote down vote up
@Before
public void actorCanBrowseTheWeb() {
    anna.can(BrowseTheWeb.with(browser));
}
 
Example #14
Source File: ShouldDescribeEachProject.java    From jenkins-build-monitor-plugin with MIT License 4 votes vote down vote up
@Before
public void actorCanBrowseTheWeb() {
    dave.can(BrowseTheWeb.with(browser));
}
 
Example #15
Source File: ShouldTellWhoIsFixingTheBrokenBuild.java    From jenkins-build-monitor-plugin with MIT License 4 votes vote down vote up
@Before
public void actorCanBrowseTheWeb() {
    ben.can(BrowseTheWeb.with(browser));
}
 
Example #16
Source File: UserAccount.java    From serenity-cucumber-bdd-screenplay with Apache License 2.0 4 votes vote down vote up
@Override
public UserAccountInformation answeredBy(Actor actor) {
    String title = BrowseTheWeb.as(actor).getTitle();
    return new UserAccountInformation(title);
}
 
Example #17
Source File: Navigate.java    From jenkins-build-monitor-plugin with MIT License 4 votes vote down vote up
@Override
public <T extends Actor> void performAs(T actor) {
    BrowseTheWeb.as(actor).getDriver().get(destination.toString());
}
 
Example #18
Source File: CompleteATodo.java    From serenity-documentation with Apache License 2.0 4 votes vote down vote up
@Before
public void jamesCanBrowseTheWeb() {
    james.can(BrowseTheWeb.with(hisBrowser));
}
 
Example #19
Source File: CompleteAllTodos.java    From serenity-documentation with Apache License 2.0 4 votes vote down vote up
@Before
public void jamesCanBrowseTheWeb() {
    james.can(BrowseTheWeb.with(hisBrowser));
}
 
Example #20
Source File: ClearCompletedTodos.java    From serenity-documentation with Apache License 2.0 4 votes vote down vote up
@Before
public void jamesCanBrowseTheWeb() {
    james.can(BrowseTheWeb.with(hisBrowser));
    jane.can(BrowseTheWeb.with(herBrowser));
}
 
Example #21
Source File: DeleteTodos.java    From serenity-documentation with Apache License 2.0 4 votes vote down vote up
@Before
public void jamesCanBrowseTheWeb() {
    james.can(BrowseTheWeb.with(hisBrowser));
}
 
Example #22
Source File: FilteringTodos.java    From serenity-documentation with Apache License 2.0 4 votes vote down vote up
@Before
public void jamesCanBrowseTheWeb() {
    james.can(BrowseTheWeb.with(hisBrowser));
}
 
Example #23
Source File: JSClick.java    From serenity-documentation with Apache License 2.0 4 votes vote down vote up
@Override
@Step("{0} clicks on #target")
public <T extends Actor> void performAs(T theActor) {
    WebElement targetElement = target.resolveFor(theActor);
    BrowseTheWeb.as(theActor).evaluateJavascript("arguments[0].click()", targetElement);
}
 
Example #24
Source File: Refresh.java    From serenity-cucumber-bdd-screenplay with Apache License 2.0 4 votes vote down vote up
public <T extends Actor> void performAs(T actor) {
    BrowseTheWeb.as(actor).getDriver().manage().deleteAllCookies();
    //BrowseTheWeb.loaded(actor).getDriver().navigate().refresh();
}