doc: webtau browser example fix
@@ -2,20 +2,18 @@ package webtauexamples
import static org.testingisdocumenting.webtau.WebTauGroovyDsl.*
-def homeSearchInput = $("#search_form_input_homepage")
+def homeSearchInput = $('input[id*="search"]')
def resultSearchInput = $("#search_form_input")
-def searchButton = $("#search_button_homepage")
def result = $('article[data-testid="result"]')
scenario("capture screenshot") {
browser.open("https://duckduckgo.com/")
- homeSearchInput.setValue("testing is documenting")
- searchButton.click()
+ homeSearchInput.waitToBe visible
+ homeSearchInput.setValue("testing is documenting\n")
result.waitTo visible
- browser.doc.withAnnotations(
- browser.doc.badge(resultSearchInput),
- browser.doc.badge(result)).capture("duckduckgo-search")
+ browser.doc.withAnnotations(resultSearchInput, result)
+ .capture("duckduckgo-search")
}
\ No newline at end of file
