From 8a6b9d064780dc893798c02b8c42d52d567c0cc8 Mon Sep 17 00:00:00 2001 From: Bradley Turek Date: Tue, 12 Sep 2023 22:28:00 -0600 Subject: [PATCH 1/3] Update duckduckgo search field selector --- docs/tutorials/first_test.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/tutorials/first_test.md b/docs/tutorials/first_test.md index 9f832999..70e94efd 100644 --- a/docs/tutorials/first_test.md +++ b/docs/tutorials/first_test.md @@ -121,7 +121,7 @@ import net.serenitybdd.core.steps.UIInteractions; public class SearchActions extends UIInteractions { public void byKeyword(String keyword) { - $("#search_form_input_homepage").sendKeys(keyword); + $("#searchbox_input").sendKeys(keyword); $(".search__button").click(); } } @@ -208,7 +208,7 @@ import net.thucydides.core.annotations.Step; public class SearchActions extends UIInteractions { @Step("Search for '{0}'") public void byKeyword(String keyword) { - $("#search_form_input_homepage").sendKeys(keyword); + $("#searchbox_input").sendKeys(keyword); $(".search__button").click(); } } From b28d8c116c7e8372f4b29c14befc66550e59a832 Mon Sep 17 00:00:00 2001 From: Bradley Turek Date: Tue, 12 Sep 2023 22:47:31 -0600 Subject: [PATCH 2/3] Update search button selector Looks like they changed this one, too. However, something else is going on that's stopping this change from being sufficient. The report says that the button is staying disabled and so we can't click on it. --- docs/tutorials/first_test.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/tutorials/first_test.md b/docs/tutorials/first_test.md index 70e94efd..4c394269 100644 --- a/docs/tutorials/first_test.md +++ b/docs/tutorials/first_test.md @@ -122,7 +122,7 @@ import net.serenitybdd.core.steps.UIInteractions; public class SearchActions extends UIInteractions { public void byKeyword(String keyword) { $("#searchbox_input").sendKeys(keyword); - $(".search__button").click(); + $("button[type='submit']").click(); } } ``` @@ -209,7 +209,7 @@ public class SearchActions extends UIInteractions { @Step("Search for '{0}'") public void byKeyword(String keyword) { $("#searchbox_input").sendKeys(keyword); - $(".search__button").click(); + $("button[type='submit']").click(); } } ``` From 091fb92ff4ff6d93ff502f47f6369af98c80ebb0 Mon Sep 17 00:00:00 2001 From: Bradley Turek Date: Tue, 12 Sep 2023 23:07:26 -0600 Subject: [PATCH 3/3] Fix typo --- docs/tutorials/first_test.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorials/first_test.md b/docs/tutorials/first_test.md index 4c394269..c759bbbb 100644 --- a/docs/tutorials/first_test.md +++ b/docs/tutorials/first_test.md @@ -188,7 +188,7 @@ However, there is one more step we can do. Serenity BDD is a living documentatio We can control how Serenity reports each method in a `UIInteractions` class using the `@Step` annotation. When you place a `@Step` annotation on a `UIInteractions` method, this method will appear in the Serenity reports whenever it is called. -Let's see how it works. Update the `NaviagateActions` and `SearchActions` classes to include the `@Step` annotations like this: +Let's see how it works. Update the `NavigateActions` and `SearchActions` classes to include the `@Step` annotations like this: ```java import net.serenitybdd.core.steps.UIInteractions;