I am getting an issue while automating www.expedia.com**. I am a beginner and learning to automate the website.
I am getting this error, and I am selecting the right element using "chropath" extension. Could anyone from the forum guide me.
Traceback (most recent call last):
File "c:/Users/test/Documents/Python3.6/Python-youtube/test.py", line 29, in <module>
driver.find_element_by_xpath("//li[3]//button[1]").click()
selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable
Code:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
import time
driver = webdriver.Chrome()
driver.get("https://www.expedia.com")
driver.maximize_window()
driver.find_element_by_xpath("//span[contains(text(),'Flights')]").click()
# Origin
driver.find_element_by_class_name('uitk-faux-input').click()
driver.find_element_by_xpath("//input[contains(@placeholder,'Where are you leaving
from?')]").send_keys('florida')
driver.find_element_by_xpath("//li[2]//button[1]").click()
# Destination
driver.find_element_by_xpath
(
"//div//div//div//div//div//div//div//div//div//div//div//div//div
//div//div//div//div//div//div//div//div[2]//div[1]//div[1]//div[1]//button[1]").click()
driver.find_element_by_xpath("//input[contains(@placeholder,'Where are you going
to?')]").send_keys('vancouver')
driver.find_element_by_xpath("//li[3]//button[1]").click()
Please advice.