require 'watir'
b=Watir::Browser.new
b.goto 'www.xyz.com'
b.maximize
b.label(:text, "Car Make").parent.spans[1].click
b.element(tag_name: 'md-option', text: "BMW").when_present.click
The above code works fine when I write for watir-classic, but when I write above code for watir-webdriver, the visibility checking is stopping me to click b.label(:text, "Car Make").parent.spans[1].click
this element, Is there any way Can I cancel out this visibility checking in watir webdriver? The code which I have written for watir-webdriver follows,
require 'watir-webdriver'
require 'watir-scroll'
b=Watir::Browser.new :chrome
b.goto 'www.xyz.com'
b.window.maximize
b.label(:text, "Car Make").parent.spans[1].click
b.element(tag_name: 'md-option', text: "BMW").when_present.click