ruby - "Element not found in the cache ..." although the same command code works when run through IRB -
i trying run script on entering input , hitting enter, new field text input open ups. when script run, cursor goes newly opened field, not enter input expected. have specified explicit timeout , script waits particular time still fails throwing: -
"element not found in cache - perhaps page has changed since looked up" #enter no. of nights browser.find_element(:xpath,"/html/body/div[5]/div/div[3]/div[2]/div[2]/div/div/div/div/div[2]/div[2]/div/div/div/div[2]/div/div/div[3]/div/div[2]/div[2]/div/div/div/div/div/div/div[3]/div/div/input").send_keys"1",:return #enter no. of rooms browser.find_element(:xpath,"/html/body/div[5]/div/div[3]/div[2]/div[2]/div/div/div/div/div[2]/div[2]/div/div/div/div[2]/div/div/div[3]/div/div[2]/div[2]/div/div/div/div[2]/div/div/div[3]/div/div/input").send_keys"2",:return
i have tried both implicit , explicit waits doesn't either.
strangely, if execute steps manually in ruby shell, works fine!
how resolve issue?
thanks! abhishek
Comments
Post a Comment