Unable to send keys string containing acute character Code Answer

Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of Unable to send keys string containing acute character without wasting too much if your time.

The question is published on by Tutorial Guruji team.

I’m trying to enter in a string that contains an acute in a character but it doesn’t seem to enter in the character. I don’t think the unicode keyboard is enabling and not sure why:

DesiredCapabilities desiredCapabilities = new DesiredCapabilities();

         public void enterYourDetailsCredentials(String firstName) {

        if (firstNameEntry.contains("téster)){
                    desiredCapabilities.setCapability("unicodeKeyboard", true);
                    signUpPage.firstNameTextField.sendKeys("téster");
                    desiredCapabilities.setCapability("resetKeyboard", true);
                }else
                    {
                    signUpPage.firstNameTextField.sendKeys(firstName);
                    }

        }

Answer

If you want to print a specific character in a string, you can just use Unicode escape sequence u followed by the character code you wish. You can access a list of those codes here: http://www.unicode.org/charts/

So, in your particular case, you can do it as follow on the lines that you wish to implement the acute:

signUpPage.firstNameTextField.sendKeys("tu00E9ster")
We are here to answer your question about Unable to send keys string containing acute character - If you find the proper solution, please don't forgot to share this with your team members.

Related Posts

Tutorial Guruji