I am new automation and I am using selenium with python and got stuck.
I am trying to upload the document using sendkeys
in selenium but getting this error.
Error -selenium.common.exceptions.WebDriverException: Message: unknown error: cannot focus element.
Section where i am trying to upload the document ::
Below is the html code:
<spane class="uk-form-file md-btn" style="width:70%;height: 50%">
Upload Document
<input type="file" ngf-select="" id="picture_ids" class="md-input ng-pristine ng-invalid ng-invalid-required ng-touched" onchange="angular.element(this).scope().imageUpload(this.files,'picture','document')" name="picture" ng-model="statusUpdate.document" style="width: 100%;" ng-required="true" required="required">
<br>
</spane>
and corresponding Selenium code:
uploaddoc=wait.until(EC.presence_of_element_located((By.XPATH, "//spane[@class='uk-form-file md-btn']")))
uploaddoc.send_keys("C:/PycharmProjects/Auc/dummy.pdf")
<spane>
. Is there any<spane/>
tag actual sytax is<span/>