Typing Special Characters

I am trying to input an URL to Safari’s address bar, say “http://www.google.com” using the command

TypeText “http://www.google.com

However, the ‘:’ is not typed and what actually is entered is “httpwww.google.com

Edit: I am using eggplant under Windows and the SUT is an iPad.

For some reason, Safari is slow at accepting TypeText commands, which is especially noticeable when sending modifier keys.

We think this has something to do with WebKit – the Apple web server library. If you try typing in the location bar or the search field in the menu bar on Safari, I think you’ll see that everything works fine there. That’s because those are standard Windows controls under the administration of the OS. It’s only the content of the windows that is controlled by WebKit, and it’s there that the problems appear. The only fix we’ve been able to identify is to significantly slow down the typing.

The first thing that you need to do is to go into the eggPlant Preferences and enable the “Send shift key down for capitals” setting.

Then you will want to use settings in your script code to modify the timing when you’re running against Safari. I’ve found that this code works:

set the nextKeyDelay to .1
set the keydowndelay to .2
TypeText "http://www.google.com"

If that doesn’t work for you, try increasing those values by another tenth of a second each.

Hi.

The problem is not unique to Safari. I am able to type characters like - :, & and capital letters in any input field. I also tried add new notes, new reminders and not just into URL bar of Safari. None of them worked.

Try this: Under Eggplant > Preferences > Run Options > Keyboard, set the “Send shift key down for capitals” dropdown to “Never”.

Thanks, that worked.