Sorry, missed the capitalization: @browser.input(id: 'Item1silver').parent.img.click or @browser.img(alt: 'Silver') or @browser.img(css: "label[for='Item1silver'] img").click
On Sat, Jan 17, 2015 at 11:58 AM, Mohan MK <[email protected]> wrote: > Thanks Titus Fortner, > > but both did not work. > > I used Xpath and was able to select > > @browser.find_element(:xpath, ".//*[@id='Item1']/div/div/fieldset/div/"+ > iPad_Finish +"/label/div").click > > , but again the issue is the second element is not visible on the screen > :( unlike Firefox, chrome does not scroll) and getting the same error for > second element i want to click Selenium::WebDriver::Error::UnknownError: > unknown error: Element is not clickable at point (712, 406). Other element > would receive the click: > > tried @browser.send_keys :page_down but i get error no method Send_keys > found > > i automated the same case with Waitr had no issues. but i am using > TestWise Community edition so i cannot run the same on different browsers. > Hence switched to Scelenium-webdriver with Rspec. this combination on Test > wise give me option of running my scripts on both FireFox and Chrome. > > > Regards, > M.K.Mohan > > > On Saturday, 17 January 2015 00:31:33 UTC+5:30, Titus Fortner wrote: > >> This is a selenium-webdriver question not a watir-webdriver question. >> Coming from a selenium-webdriver background, using watir-webdriver has made >> a number of things much easier when testing, so if you're just starting >> out, I highly recommend learning watir. >> >> The issue here is that the input field you are trying to click is a 1x1 >> pixel element, and it is obscured by the element below. You can click on >> the img element instead. >> >> In Watir, you could do: @browser.input(id: 'item1silver').parent.img. >> click >> >> In selenium this should work: >> @browser.find_element(css: "label[for='item1silver'] img).click >> >> On Fri, Jan 16, 2015 at 12:37 PM, Mohan MK <[email protected]> wrote: >> >>> Hi All, >>> >>> I am new using selenium-webdriver. Using Testwise , selenium-webdriver, >>> RSpec to trying to automate http://store.apple.com/us/buy- >>> ipad/ipad-air-2 site >>> basically the combination of Finish, Storage and Connectivity and >>> verifying the summary generated. >>> >>> @browser.find_element(:id, "Item1silver").click >>> @browser.find_element(:id, "Item216gb").click >>> @browser.find_element(:id, "Item3wifi").click >>> >>> Summary i get would be : iPad Air 2 Wi-Fi 16GB - Silver >>> >>> ____________________________________________________________ >>> ___________________________________________ >>> >>> Problem is, i am sucessfully able to run the script on FireFox, but when >>> i run the same on Chrome i get following error >>> >>> F >>> Failures: >>> 1) Test Suite New Test Case >>> Failure/Error: @browser.find_element(:id, Item1silver).click >>> Selenium::WebDriver::Error::UnknownError: >>> unknown error: Element is not clickable at point (712, 406). Other >>> element would receive the click: >>> ... >>> (Session info: chrome=39.0.2171.95) >>> (Driver info: chromedriver=2.13.307647 >>> (5a7d0541ebc58e69994a6fb2ed930f45261f3c29),platform=Windows >>> NT 6.1 SP1 x86) >>> >>> is there any better way than browser.find_element that i can use so that >>> the script runs on both FireFox as well as Chrome. >>> >>> Please let me know. Thanks in advance >>> >>> M.K.Mohan >>> >>> -- >>> -- >>> Before posting, please read http://watir.com/support. In short: search >>> before you ask, be nice. >>> >>> [email protected] >>> http://groups.google.com/group/watir-general >>> [email protected] >>> >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "Watir General" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- > -- > Before posting, please read http://watir.com/support. In short: search > before you ask, be nice. > > [email protected] > http://groups.google.com/group/watir-general > [email protected] > > --- > You received this message because you are subscribed to the Google Groups > "Watir General" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected] --- You received this message because you are subscribed to the Google Groups "Watir General" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
