Skip to content

Commit

Permalink
[no ci] update google ui examples #2318
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrthomas committed May 22, 2023
1 parent 149f48a commit e7f6444
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion examples/jobserver/src/test/java/jobtest/web/web1.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Feature: web 1
Then match html('.flash-error') contains 'Incorrect username or password.'

Given driver 'https://google.com'
And input("input[name=q]", 'karate dsl')
And input("textarea[name=q]", 'karate dsl')
When submit().click("input[name=btnI]")
Then waitForUrl('https://github.com/karatelabs/karate')

Expand Down
2 changes: 1 addition & 1 deletion examples/jobserver/src/test/java/jobtest/web/web2.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ Scenario: try to login to github
Then match html('.flash-error') contains 'Incorrect username or password.'

Given driver 'https://google.com'
And input("input[name=q]", 'karate dsl')
And input("textarea[name=q]", 'karate dsl')
When submit().click("input[name=btnI]")
Then waitForUrl('https://github.com/karatelabs/karate')
2 changes: 1 addition & 1 deletion examples/zip-release/src/demo/web/google.feature
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Scenario: try to login to github
Then match html('.flash-error') contains 'Incorrect username or password.'

Given driver 'https://google.com'
And input("input[name=q]", 'karate dsl')
And input("textarea[name=q]", 'karate dsl')
When submit().click("input[name=btnI]")
# this may fail depending on which part of the world you are in !
Then waitForUrl('https://github.com/karatelabs/karate')
4 changes: 2 additions & 2 deletions karate-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ So instead of this, which uses [`submit()`](#submit):

```cucumber
Given driver 'https://google.com'
And input('input[name=q]', 'karate dsl')
And input('textarea[name=q]', 'karate dsl')
When submit().click('input[name=btnI]')
Then match driver.url == 'https://github.com/karatelabs/karate'
```
Expand All @@ -888,7 +888,7 @@ You can do this. Note that `waitForUrl()` will also act as an assertion, so you

```cucumber
Given driver 'https://google.com'
And input('input[name=q]', 'karate dsl')
And input('textarea[name=q]', 'karate dsl')
When click('input[name=btnI]')
And waitForUrl('https://github.com/karatelabs/karate')
```
Expand Down
2 changes: 1 addition & 1 deletion karate-demo/src/test/java/driver/demo/demo-01.feature
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ Feature: browser automation 1
Then match html('.flash-error') contains 'Incorrect username or password.'

Given driver 'https://google.com'
And input("input[name=q]", 'karate dsl')
And input("textarea[name=q]", 'karate dsl')
When submit().click("input[name=btnI]")
Then waitForUrl('https://github.com/karatelabs/karate')
2 changes: 1 addition & 1 deletion karate-demo/src/test/java/driver/demo/demo-02.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Feature: browser automation 2
Scenario: google search, land on the karate github page, and search for a file

Given driver 'https://google.com'
And input('input[name=q]', 'karate dsl')
And input('textarea[name=q]', 'karate dsl')
When click('input[name=btnI]')
Then waitForUrl('https://github.com/karatelabs/karate')

Expand Down
4 changes: 2 additions & 2 deletions karate-demo/src/test/java/driver/demo/demo-03.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ Feature: 3 scenarios
Then match html('.flash-error') contains 'Incorrect username or password.'

Given driver 'https://google.com'
And input("input[name=q]", 'karate dsl')
And input("textarea[name=q]", 'karate dsl')
When submit().click("input[name=btnI]")
Then match driver.url == 'https://github.com/karatelabs/karate'

Scenario: google search, land on the karate github page, and search for a file

Given driver 'https://google.com'
And input('input[name=q]', 'karate dsl')
And input('textarea[name=q]', 'karate dsl')
When click('input[name=btnI]')
Then waitForUrl('https://github.com/karatelabs/karate')

Expand Down

0 comments on commit e7f6444

Please sign in to comment.