Here is the code snippet for the input field:
<span ng-if="cell.state != 'edit_mode'" class="ng-scope">
<span ng-class="{'with-right-padding' : cell.input_type === 'auto_complete'}" class="value-cell ng-binding">10 </span>
<!-- ngIf: cell.valid === false && server_side_errors_present -->
</span>
The steps I followed are as follows:
//click on the field
element(by.xpath("//div[@class='animate']/div/div[2]/span[2]/section/div/div/section/div/div/div/span/section/div[2]/div/div/section/div[2]/section[1]/table/tbody[1]/tr[4]/td[3]/span/span[1]/span")).click();
//enter the value
element(by.xpath("//div[@class='animate']/div/div[2]/span[2]/section/div/div/section/div/div/div/span/section/div[2]/div/div/section/div[2]/section[1]/table/tbody[1]/tr[4]/td[3]/span/span[1]/span")).sendKeys("10");
The issue I encountered is that while the click event works, the send keys action does not.
Below is the error message I received:
Failures:
1) Customer Add a estimate
Message:
Failed: unknown error: cannot focus element
(Session info: chrome=48.0.2564.109)
(Driver info: chromedriver=2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4),platform=Windows NT 6.1 x86_64) (WARNING: The server did not provide any stacktrace information)
// More detailed error information
Stack:
UnknownError: unknown error: cannot focus element
(Session info: chrome=48.0.2564.109)
(Driver info: chromedriver=2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4),platform=Windows NT 6.1 x86_64) (WARNING: The server did not provide any stacktrace information)
// More detailed error information
If anyone has a solution to this problem, please share it with me.