> rx_selector = delete_regexps_from(selector) > > if rx_selector.has_key?(:label) && should_use_label_element? > - selector[:id] = id_from_label(rx_selector.delete(:label)) || return > + label = label_from_text(rx_selector.delete(:label)) || return > + id = label.attribute(:for) > + id ? selector[:id] = id : wd = label
I think doing assignments in a ternary operator makes it pretty hard to see what's going on. Split this into an if/else. --- Reply to this email directly or view it on GitHub: https://github.com/watir/watir-webdriver/pull/201/files#r3853178
_______________________________________________ Wtr-development mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-development
