You can correctly input text on remote IE-11 browsers in Automate through a custom BrowserStack capability.
sendkeys() is a method in Selenium that allows you to type content automatically into an editable field while executing any tests.
Now, while running a Selenium test on IE11 locally or through a grid, you will sometimes face one or more of the following issues with the sendKeys Selenium command:
To solve all the above issues, BrowserStack has a custom capability as explained in the next section.
BrowserStack capability to solve sendKeys() issue in IE-11
BrowserStack provides a custom capability that fixes the issue with sendKeys on the IE-11 browser. If you use the below capability in your test script and then use the sendKeys command, then you will not experience the bug (as stated above) while running your tests on BrowserStack.
platforms:-os: Windows
osVersion:10browserName: IE
browserVersion:11.0ie:sendKeys:true
BrowserStack SDK is a plug-n-play solution that takes care of all the integration steps for you. Using the BrowserStack SDK is the recommended integration method for your project. To know more, visit the SDK core concepts page.
The capability as shown below, needs to be declared along with all other capabilities like browser, os etc. at the start of the test script and you will still need to use the sendKeys command as you have been using, for entering keyboard inputs into an editable field. The code snippet below shows how to declare the sendKeys capability at the start of your test script:
The capability as shown below, needs to be declared along with all other capabilities like browser, os etc. at the start of the test script and you will still need to use the sendKeys command as you have been using, for entering keyboard inputs into an editable field. The code snippet below shows how to declare the browserstack.sendKeys capability at the start of your test script:
// for internet explorerInternetExplorerOptions capability =newInternetExplorerOptions();
capability.AddAdditionalCapability("browserstack.sendKeys","true",true);
$caps['browserstack.sendKeys']="true";
caps["browserstack.sendKeys"]="true"
caps["browserstack.sendKeys"]="true"
my$capabilities={"browserstack.sendKeys"=>"true"}
You can contact support if the capability does not resolve the issue with the sendKeys command in IE-11.
Did this page help you?
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked