Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wait for element attribute values is not supported. #471

Open
kapoorlakshya opened this issue Nov 28, 2018 · 0 comments
Open

Wait for element attribute values is not supported. #471

kapoorlakshya opened this issue Nov 28, 2018 · 0 comments

Comments

@kapoorlakshya
Copy link

As of watir 6.13, we are able to replace element.wait_until { |el| el.text == 'Foo' } with element.wait_until(text: 'Foo'). However, this is not supported by this gem as of v2.2.5.

See [2] for error.

[1] pry(#<Test)> @browser.div(class: 'notificationMessage').wait_until(text: "Your request has been successfully submitted.")

=> #<Watir::Div: located: true; {:class=>"notificationMessage", :tag_name=>"div"}>
[2] pry(#<Test>)> @current_page.notification_message_element.wait_until(text: "Your request has been successfully submitted.")

=> NoMethodError: undefined method `zero?' for {:text=>"Your request has been successfully submitted."}:Hash
from I:/Ruby223x64/lib/ruby/gems/2.3.0/gems/watir-6.15.0/lib/watir/wait.rb:86:in `run_with_timer'
[3] pry(#<Test> @current_page.notification_message_element.element.wait_until(text: "Your request has been successfully submitted.")

=> #<Watir::Div: located: true; {:class=>"notificationMessage", :visible=>true, :tag_name=>"div"}>

I'll try to figure out the changes required and submit a PR to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants