Ruby on Rails Thursday, May 28, 2015


On 28 May 2015, at 14:24, Scott Ribe <scott_ribe@elevated-dev.com> wrote:

On May 28, 2015, at 6:15 AM, Rafael s <rafaelcrvs@gmail.com> wrote:

I want to just make one condition: IF find the button...clicks, else continues execution of the other methods

If the button doesn't exist, you're calling displayed? on it anyway.
@Scotte:
An element can exist but be hidden, that's what #displayed? method checks according the API docs:
def displayed?    bridge.isElementDisplayed @id  end
The problem with the search by CSS is that you can have them more than one on a page. What if you try to find the same button by id ? Just add one your HTML code to see what will happen.

--
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
https://www.linkedin.com/in/scottribe/
(303) 722-0567 voice





--
You received this message because you are subscribed to a topic in the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rubyonrails-talk/LyRY6Xm0nl4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/1A37A3B8-A6E8-4E0E-AF3A-F7D098EC0DA7%40elevated-dev.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment