Skip to content

Commit

Permalink
feat: add source() to get the source of a page (#3461)
Browse files Browse the repository at this point in the history
  • Loading branch information
andre-becker committed May 12, 2024
1 parent edd700a commit ebeac1b
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -15,4 +15,8 @@ public static Question<String> currentUrl() {
public static Question<String> alertText() {
return Question.about("alert text").answeredBy(actor -> BrowseTheWeb.as(actor).getAlert().getText());
}

public static Question<String> source() {
return Question.about("page source").answeredBy(actor -> BrowseTheWeb.as(actor).getDriver().getPageSource());
}
}

0 comments on commit ebeac1b

Please sign in to comment.