From 331c2b24eb8d5220f03b4797b9928ae31cffc57b Mon Sep 17 00:00:00 2001 From: Ryan Rosenblum Date: Wed, 1 May 2019 12:37:11 -0400 Subject: [PATCH] Fix code examples for waiting --- _guides/waiting.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_guides/waiting.md b/_guides/waiting.md index b24de9eb..9cc99345 100644 --- a/_guides/waiting.md +++ b/_guides/waiting.md @@ -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 %} @@ -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? }