Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebElement.getText() does not return the correct value in case of comma separated numbers. #3384

Closed
ocindev opened this issue Jan 19, 2017 · 1 comment

Comments

@ocindev
Copy link

ocindev commented Jan 19, 2017

Meta -

OS: Windows 10 64-Bit
Selenium Version:
selenium-remote-driver-3.0.1
Browser:
Chrome

Browser Version:
Version 55.0.2883.87 m (64-bit)

Expected Behavior -

We have an td html element containing the text 0,29. After finding it via driver.findElement(By.xpath("xpath")) the call of the method WebElement.getText() should return 0,29 as string.

Actual Behavior -

The method WebElement.getText() returns 0.29 as string.

Steps to reproduce -

Try to find any html element containing a number as string (e.g 0,45) with the selenium remote driver. The call of WebElement.getText() will return a number as string separated with dots. Probably because of the internal framework conversion from json to webElement

barancev added a commit that referenced this issue Apr 9, 2017
@barancev
Copy link
Member

barancev commented Apr 9, 2017

I've added tests for this case by d28fa64
Firefox passes them both locally and remotely in Selenium 3.3.1 and geckodriver 0.15.

So it must be related to environment. What's your locale?

@lock lock bot locked and limited conversation to collaborators Aug 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants