ElementNotInteracable Exception for Selenium Chrome webdriver
I'm using latest python and latest Selenium chrome webdriver. I'm trying to
have a simple code to search in youtube but I'm getting the below error. Can
anyone help me?
File "search.py", line 8, in searchBox.click()
Selenium.common.exceptions.ElementNotInteractableException: Message: element
not interactable
#MyCodeStartsHere
from selenium import webdriver
driver = webdriver.Chrome()
driver.get('https://youtube.com')
searchBox = driver.find_element_by_xpath('//*[@id="search"]')
if searchBox.is_enabled():
searchBox.click()
searchBox.send_keys("youtube test")
searchButton =
driver.find_element_by_xpath('//*[@id="search-icon-legacy"]/yt-icon')
searchButton.click()
else:
print("What the heck")
#MyCodeEndsHere
--
https://mail.python.org/mailman/listinfo/python-list
python object is NoneType even after declaring as global: ttk textbox
I have a very simple script that retrieves the value from a text box upon click
of a checkButton. But in click event, I'm receiving text box object as NoneType
even after setting it as global. Pls help.
Output: !!ERROR!! Tag is None
### Source Code ###
from tkinter import *
from tkinter import ttk
import os
def submitData():
global tag
global tagBox
if (tagBox is not None):
tag = tagBox.get("1.0","end-1c")
print ("!!SUCESS!! tag -->", tag)
else:
print ("!!ERROR!! Tag is None")
gui = Tk()
gui.title("GUI")
gui.geometry('250x300')
tag = "NA"
tagBoxLabel = Label(gui, text = "Tag: ").grid(column=0, row=5, pady=30,
sticky="EN")
tagBox = Text(gui, height=1, width=20).grid(column=1, row=5, pady=30,
sticky="WN")
submitButton = ttk.Button(gui, text="Submit", command=lambda:
submitData()).grid(column=1, row=7)
gui.mainloop()
--
https://mail.python.org/mailman/listinfo/python-list
