The below is the id of the "Ok" button inside the popup window , just wanted to say that i was able to sendkeys and ENTER for another field inside the same popup window : OK button
The exception i'm getting is:
selenium.common.exceptions.ElementNotInteractableException: Message: Cannot click on element
Also adding the actual GUI : actual window
The code is below:
def create_new_customer_iden():
browser.find_element_by_css_selector("#customer_care_app_tab > tbody > tr > td:nth-child(2)").click()
browser.find_element_by_css_selector("#add_customer > td:nth-child(2)").click()
browser.find_element_by_id("go_srch_button").click()
random_number=random.randrange (10000, 99999)
statement ='INSERT INTO sa_customer(CUSTOMER_NO, CUSTOMER_NAME) VALUES(:1, :2)'
cursor.execute(statement,(random_number,random_number))
connection.commit()
browser.find_element_by_name("popup_search_init_customer_id").send_keys(random_number)
browser.find_element_by_name("popup_search_init_customer_id").send_keys(Keys.ENTER)
# works great until here
browser.find_element_by_id("ok_button").click()
i found another issue : if i'm adding the below lines of code :
button=browser.find_element_by_id ("ok_button")
print(button)
button.click()
The print gives me this element:
selenium.webdriver.remote.webelement.WebElement (session="75fba3d3-bef4-4800-a03d-bfbfcf831209", element="4d27c723-ed64-40a5-9da0-102a52f4d910")
BUT the last line of code throws me the below exception :
selenium.common.exceptions.ElementNotInteractableException: Message: Cannot click on element
WHICH means that i need to find a subtitute to the click() operation. Any suggestions ???