HiI have brought a few books starting with Practical test automation. I am new beginner. I have also brought the recipe books.I am trying to put the theory into practice using http://store.demoqa.com ecommerce website.I am using the approach of using the recorder to start with and have come across an issue where what has been recorded is breaking when it reached the pop up where I have two boxes which one says Go to checkout and other continue shopping. I will paste the code below from the testwise recorder. Now I can see form the inspector it looks like a pop up but as a new comer how do I resolve this. I have looked at a the selnuim webriver ruby snippets around the javascript and tried those but now luck. When one gets stuck on issue like this what is the best strategy to resolve issues as these?Any help appreciated.
25: driver.find_element(:link_text, "iPhone 5").click (works)26: driver.find_element(:xpath,"//input[@value='Add To Cart']").click (works)27: driver.find_element(:link_text, "Go to Checkout").click (this fails below)Error
Unable to locate element: {"method":"link text","selector":"Go to Checkout"}[remote server] file:///C:/Users/arifi/AppData/Local/Temp/webdriver-profile20151128-11404-1ti3uld/extensions/fxdriver@googlecode.com/components/driver-component.js:10271:in `FirefoxDriver.prototype.findElementInternal_'[remote server] file:///C:/Users/arifi/AppData/Local/Temp/webdriver-profile20151128-11404-1ti3uld/extensions/fxdriver@googlecode.com/components/driver-component.js:10280:in `FirefoxDriver.prototype.findElement'[remote server] file:///C:/Users/arifi/AppData/Local/Temp/webdriver-profile20151128-11404-1ti3uld/extensions/fxdriver@googlecode.com/components/command-processor.js:12274:in `DelayedCommand.prototype.executeInternal_/h'
HiI have brought a few books starting with Practical test automation. I am new beginner. I have also brought the recipe books.I am trying to put the theory into practice using http://store.demoqa.com ecommerce website.I am using the approach of using the recorder to start with and have come across an issue where what has been recorded is breaking when it reached the pop up where I have two boxes which one says Go to checkout and other continue shopping. I will paste the code below from the testwise recorder. Now I can see form the inspector it looks like a pop up but as a new comer how do I resolve this. I have looked at a the selnuim webriver ruby snippets around the javascript and tried those but now luck. When one gets stuck on issue like this what is the best strategy to resolve issues as these?Any help appreciated.
25: driver.find_element(:link_text, "iPhone 5").click (works)26: driver.find_element(:xpath,"//input[@value='Add To Cart']").click (works)27: driver.find_element(:link_text, "Go to Checkout").click (this fails below)Error
Unable to locate element: {"method":"link text","selector":"Go to Checkout"}[remote server] file:///C:/Users/arifi/AppData/Local/Temp/webdriver-profile20151128-11404-1ti3uld/extensions/fxdriver@googlecode.com/components/driver-component.js:10271:in `FirefoxDriver.prototype.findElementInternal_'[remote server] file:///C:/Users/arifi/AppData/Local/Temp/webdriver-profile20151128-11404-1ti3uld/extensions/fxdriver@googlecode.com/components/driver-component.js:10280:in `FirefoxDriver.prototype.findElement'[remote server] file:///C:/Users/arifi/AppData/Local/Temp/webdriver-profile20151128-11404-1ti3uld/extensions/fxdriver@googlecode.com/components/command-processor.js:12274:in `DelayedCommand.prototype.executeInternal_/h'