I'm working an OpenBravo application. I'm facing a problem with clicking an element when tried with a text id class. I'm able to find the element but the element is not clicking on that button.
I used the click()
event with the action sendKeys()
in JavaScript but it is still not working.
driver.findElement(By.id("terminal_containerWindow_pointOfSale_DWCRM_UI_EmployeeIdPopup_bodyButtons_okButton")).click();
Html format is
<div id="terminal_containerWindow_pointOfSale_DWCRM_UI_EmployeeIdPopup_bodyButtons_control">
<input style="width: 100%;margin-bottom:0px;background-color: #E8E8E8;width:300px" readonly="readonly" class="enyo-input input" id="terminal_containerWindow_pointOfSale_DWCRM_UI_EmployeeIdPopup_bodyButtons_EmployeeName" type="text" value="Kanika Sachdeva">
<br id="terminal_containerWindow_pointOfSale_DWCRM_UI_EmployeeIdPopup_bodyButtons_control2">
<input style="width: 100%;margin-bottom:0px;width:300px" maxlength="15" class="enyo-input input" id="terminal_containerWindow_pointOfSale_DWCRM_UI_EmployeeIdPopup_bodyButtons_EMPLOYEEID" placeholder="Enter Employee Id ..." type="text">
<br id="terminal_containerWindow_pointOfSale_DWCRM_UI_EmployeeIdPopup_bodyButtons_control3">
<button class="enyo-tool-decorator btnlink btnlink-gray modal-dialog-button" id="terminal_containerWindow_pointOfSale_DWCRM_UI_EmployeeIdPopup_bodyButtons_okButton">OK</button>
</div>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.