For automated testing a react app, we are using webdriverio. In one such test, there is a text in the button which says "Don't Cancel" wherein we test whether the text in the button is same as what is expected. During this test, webdriverio captures the text as "Don'T Cancel" whereas in the UI it is "Dont't Cancel" which leads to failure of that test case. Tried replacing the single quote with HTML entities like &39; and ' but it doesn't solve the issue. Chrome webdriver is used while testing. Why does this happen and what maybe the solution for this case?