Question mark "?" in enterText

WindowTester allows you to easily create and run unit tests for every GUI they build. It can also be used to generate system level tests.

Moderators: gnebling, Eric Clayberg, Dan Rubel, keertip, Phil Quitslund

Question mark "?" in enterText

Postby iduman » Mon Mar 30, 2009 4:54 am

I got exception and time out when I write

Code: Select all
ui.enterText("?12");


any suggestions ?
iduman
 
Posts: 21
Joined: Tue Nov 18, 2008 5:46 am

Re: Question mark "?" in enterText

Postby 3061 » Mon Mar 30, 2009 6:22 am

Might be a locale problem. This might happen if you're not using a US System or US keyboard layout.

Try pasting this in your code and use the enterTextWithTempLocale-Method to enter your text. It will display the locales in the console if you're not sure what your currentlocale is.

Code: Select all
import com.windowtester.runtime.WT;


Code: Select all
   /**
    * Use this if ui.enterText(String s) does not enter some chars correctly.
    *
    * @param s
    *            The text to be entered
    * @param language
    *            examples: "en" for English, "de" for German
    * @param country
    *            examples: "US" for USA, "DE" for Germany
    */
   private void enterTextWithTempLocale(String s, String language, String country)
   {
      Locale defaultLocale = Locale.getDefault(); // remember previous Locale
      System.out.println("Default Locale is " + defaultLocale);

      Locale.setDefault(new Locale(language, country));
      System.out.println("Setting Locale to \"" + language + " " + country + "\"...");

      WT.setLocaleToCurrent();

      // Locale.setDefault(new Locale("de","DE"));
      ui.enterText(s); // enter the text in the ui

      Locale.setDefault(defaultLocale); // reset to previous locale
      WT.setLocaleToCurrent();
      System.out.println("Locale set back to " + defaultLocale + ".");
   }
3061
 
Posts: 42
Joined: Mon Feb 23, 2009 12:43 am

Re: Question mark "?" in enterText

Postby Phil Quitslund » Mon Mar 30, 2009 12:00 pm

Great suggestions. Any luck?

-phil
--
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
Moderator
 
Posts: 491
Joined: Fri Apr 28, 2006 6:26 am

Re: Question mark "?" in enterText

Postby iduman » Thu Apr 02, 2009 10:21 pm

I think this issue should be handled by Window Tester internally.
iduman
 
Posts: 21
Joined: Tue Nov 18, 2008 5:46 am

Re: Question mark "?" in enterText

Postby Phil Quitslund » Mon Apr 06, 2009 7:14 am

Agreed. We're just trying to debug. Once we understand the issue more fully we can see about pushing a fix into the runtime. Along these lines, thanks for submitting your report to support. We'll work on the issue there and post updates.


-phil
--
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
Moderator
 
Posts: 491
Joined: Fri Apr 28, 2006 6:26 am


Return to Window Tester

Who is online

Users browsing this forum: No registered users and 1 guest