Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions _guides/waiting.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ condition needs to be met. `#wait_until` will execute the block until a truthy r

{% highlight ruby %}
browser.wait_until { |b| b.title == "Foo" }
browser.window(title: "Foo")wait_while(&:exists?)
browser.window(title: "Foo").wait_while(&:exists?)
browser.alert.wait_until { |a| a.text == "foo" }
browser.button(name: 'submit').wait_until(&:enabled?)
{% endhighlight %}
Expand All @@ -75,7 +75,7 @@ Note that it is encouraged to use `#to_proc` syntax when possible:

{% highlight ruby %}
# Good
browser.text_field(title: 'Search').wait_until(message: "Can't find it" &:present?)
browser.text_field(title: 'Search').wait_until(message: "Can't find it", &:present?)

# Less Good
browser.text_field(title: 'Search').wait_until(message: "Can't find it") { |el| el.present? }
Expand Down