Without further ado, go straight to the method:
The original part of the code is:
The original part of the code is:
username=self.wait.until(EC.presence_of_element_located((By.ID,'loginName')))
password=self.wait.until(EC.presence_of_element_located((By.ID,'loginPassword')))
submit=self.wait.until(EC.presence_of_element_located((By.ID,'loginAction')))
username.send_keys(self.username)
password.send_keys(self.password)
submit.click()
After the operation error: selenium.com mon. Exceptions. ElementNotInteractableException: Message: element not interactable.
Solution: 1. Overwrite other elements temporarily to ensure your own element
We can change the waiting conditions By self.wait. Until (expected_conditions.invisiblity_of_element_located((by.id,’id_of_the_element_to_be_invisiblity’)))).
The other is self.wait. Until (expected_conditions.element_to_be_clickable((by.id,’id_of_the_element_to_be_clickable’))). Here I use the second method.
submit=self.wait.until(EC.element_to_be_clickable((By.ID,'loginAction')))
2. Permanently overwrite elements to secure your own.
The method is the following code:
WebElement ele = driver.findElement(By.xpath("element_xpath"));
JavascriptExecutor executor = (JavascriptExecutor)driver;
executor.executeScript("arguments[0].click();", ele);
The second method has not been well understood for the time being, and those who have understood can communicate with each other.
Read More:
- [Solved] selenium.common.exceptions.WebDriverException: Message: unknown error: DevToolsActivePort file doesn
- Python + selenium drop-down list error message: element not interactive
- Selenium reports an error and solves the problem of element not interactive exception, element not interactive
- Summary of common runtimeException exceptions
- Solve the unmarshalling error: unexpected element (URI: “local:” name “). Expected elements are
- Solve selenium error — unknown error: devtoolsactivport file doesn’t exist
- Vue3 uses element plus package to solve the problem of occasionally disordered code on the icon after it goes online
- solve com.mysql.jdbc . exceptions.jdbc4 .MySQLSyntaxErrorException:
- Selenium: 8 Ways to Locate Elements
- Element ‘dependency‘ cannot have character [children], because the type‘s content type is element-on
- [Error][IntelliJ IDEA] Element XXX is not allowed here
- How to Solve Yolov5 Common Error (Three Errors)
- Failed to execute ‘getComputedStyle’ on ‘Window’: parameter 1 is not of type ‘Element’.
- Property ‘style’ does not exist on type ‘element‘
- Spring boot integrates Mongo to solve some common connection and permission problems. Docker compose installs Mongo
- Error: php56w-common conflicts with php-common-5.3.3-48.el6_ 8.x86_ 64
- Git prompt this. $message is not a function?
- The solution of this. $message is not a function
- Solve the problem of showing unregistered (unknown custom element) when importing components into Ant Design Pro
- error: initializer element is not constant [How to Solve]