我一直试图在一个元素上使用sendkeys,但它总是说:"selenium.common.exceptions.ElementNotInteractableException: Message: Element is not visible"
。AngularJS上的Python + Selenium接口
的HTML代码是:
<input class="form-control inspectletIgnore ng-pristine ng-untouched ng-valid-email-not-match ng-empty ng-valid-email ng-invalid ng-invalid-required" id="email" ng-disabled="ad.isEditMode" required="" name="Email" ng-model="ad.Email.value" type="email">
我试着用不同的XPath来定位元素:
//*[@id="email"] | //input[@ng-model = 'ad.Email.value']
还试图用JavaScript的:
document.getElementById('email').value='[email protected]'
他们没有加工。任何建议如何处理这个?这是一个很头疼......
你使用的确切的语言? – Andersson
我正在使用Python。 – Unchangeable
尝试'print(len(driver.find_elements_by_id(“email”)))'。它是'1'吗? – Andersson