from selenium import webdriver
import time
query = ('maps')
if "maps" in query:
driver = webdriver.Firefox()
driver.get("
https://www.google.com/maps/")
driver.find_element_by_id("searchboxinput").send_keys('surat')
driver.find_element_by_id("searchbox-searchbutton").click()
element = driver.find_elements_by_xpath("/html/body/jsl/div[3]/div[9]/div[9]/div/div[1]/div/div/div[10]/h2")
print(element.text)
#ERROR :::::---AttributeError: 'list' object has no attribute 'text'
# this type of error was shown in the code when i run pls pls pls help me