[QA] ° (degree) symbol in selenium tests with chrome

Željko Filipin zfilipin at wikimedia.org
Mon Jul 22 11:12:39 UTC 2013


On Fri, Jul 19, 2013 at 5:16 PM, Tobi Gritschacher <
tobias.gritschacher at wikimedia.de> wrote:

> In a selenium test, if I try to enter a string containig the ° (degree)
> symbol into a textfield (e.g. 42° 09.231' N 008° 34.386' E), that would not
> work with chrome. it works fine in firefox, but in chrome it just leaves
> the ° out, resulting in a string like 42 09.231' N 008 34.386' E. do you
> know if there is a solution for that?
>  addition: I did already add "# -*- encoding : utf-8 -*-" in the first
> line of the testfile.
>

It works on my machine! :)

I have Mac 10.8.4, Chrome 28, Ruby 2.0.0p247, selenium-webdriver 2.33.0,
watir-webdriver 0.6.4, ChromeDriver v2.1.210398.

If I run this Ruby script:

require "watir-webdriver"
browser = Watir::Browser.new :chrome
browser.goto "google.com"
browser.text_field(name: "q").set "42° 09.231' N 008° 34.386' E"
browser.screenshot.save "chrome.png"

degree symbol is entered into text field (see attached screen shot).

Can you share your script and environment?

Željko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wikimedia.org/pipermail/qa/attachments/20130722/2f4b0c42/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: chrome.png
Type: image/png
Size: 40486 bytes
Desc: not available
URL: <http://lists.wikimedia.org/pipermail/qa/attachments/20130722/2f4b0c42/attachment-0001.png>


More information about the QA mailing list