Coded UI typing "#d" opens file menu - coded-ui-tests

during playback I run into an issue:
uIEMailAdresseEdit.Text = this.BasisWeb_0_Anmeldung_Zugangsdaten_SetzenParams.UIEMailAdresseEditText;
In my scenario I have users with an email address like this "user#data.com". If the "#d" is typed in, the file menu of Internet Explorer is opened (german Version: alt + d is the same shortcut as alt + f in english Version).
My testrun crashes at this point. Of course I could use other email addresses, but this is not an option for me.
I'm using Windows 7 64bit and Visual Studio 2015 Enterprise Update 3.
Any ideas?
Best regards
benny

Benny,
Setting the text does enter the string in character by character but I do find it mysterious that you're having this issue. I've entered hundreds of random email addresses in this way and never had keyboard shortcuts pop up. I'd try four things:
Before changing the text of the control object, make sure that you've set the focus on the object.
Ensure that the parameter text you're trying to send to the control object is a literal string.
Try using "Keyboard.SendKeys" directly. To me this seems counterintuitive, in my opinion you should only be seeing this issue when using Keyboard.SendKeys, not when setting the text directly.
Do some substring Voodoo. IE send the substring before the '#', then the '#', then the remainder of the string. This is ugly but 100% should work.
If you end up resolving the issue, please let us know!

Related

MBCS File Menus generate ???? Characters

I am working on an MBCS app using MFC. I am trying to support Asian languages. For the purposes of this discussion, we'll say I'm trying to support Chinese. I am able to support Pop up dialogs via MessageBoxW and Dialog SCREENs by pasting Chinese characters directly into the RC file. I can't get file menus to work using either resource view or editing the RC file directly. Whenever I type in ANY Asian character, the screen shows ???. One ? for each character. I have tried modifying the menu in C++ using ModifyMenuW. I get more question marks. Visual Studio shows everything working, and the RC file is unicode (UTF-16). I can't easily convert my project to unicode mode. Spanish, French, and German all works fine (one of the Essets in German doesn't work, but that isn't a show stopper). What should I try next?
Thanks in advance!
Well, the easy answer would be change the application to Unicode, but this is not always simple, or possible at all.
Concerning using Unicode in a MBCS application, some things are possible and some others not. For example, I have made a MBCS application displaying and editing translations of program strings (messages, menues etc) in a ListView control, however ListView does have a specific message to turn it to Unicode (LVM_SETUNICODEFORMAT) and support operations (see also CCM_SETUNICODEFORMAT). Menus aren't controls though, but they do have "wide" (Unicode) functions.
If you want to use Unicode in your application, there are some tests you need to make. Success is not guaranteeded, but you can at least draw some conclusions and determine whether what you want to do is possible.
Test1:
You mentioned trying ModifyMenuW(), but this will try to modify an existing menu. Instead, try InsertMenuW() or InsertMenuItemW(). Any unicode string should be displayed properly, so try not just Chinese, but other laguages too (eg Greek or Russian). And btw, I can't see how French works and German doesn't (they use the same codepage - West European). What's the system codepage of your test-machine?
Test2: (if the above has failed)
Try changing the whole menu (SetMenu()) with having a single (unicode) menu item as its root.
Test3: (if the above have failed)
Then you need to check whether the window containing the menu must be Unicode. Create a simple "Hello World" Win32 application, or find a sample, if Visual Studio does not do this for you (these basically register the window class, create the main window and start the message-loop) - you must add a menu too, using the "wide" version of the menu functions explicitly. If this doesn't work, try changing the code that creates the window to unicode. This way you will know whether you need a unicode window, to own the menu.
Please make these tests and let us know the results. I will further post if needed.

How to insert an "—" direclty from my Keyboard without numberpad?

I have searched all corners of the internet, yet to find an answer to my simple question:
How to place, directly from keyboard input, the Em-Dash "—" character onto a code editor such as Notepad++ or Dreamweaver using modern notebooks (such as a dell xps 13" 2015, win10 64bit) without:
any extended keyboard numbpad, obviously;
any third party automation scripting softwares;
any charactermap insertion tools such as windows charactermap
How? Thanks!
I imagine you're asking about how to do it in Windows here.
I assume you know how you'd do it if you had a numeric keypad (Alt + 0151 if as it seems you are on the 1252 code page).
See also Insert Unicode characters via the keyboard? , in order to use the unicode value (Alt + +2014) .
This is an at least related question: How to emulate numpad on a PC laptop?
Possible solutions:
Most notebooks do have an hidden "numpad", accessible through the Fn key (see for example https://www.dummies.com/computers/pcs/the-hidden-numeric-keypad-on-your-laptop/ ).
I couldn't find out for sure if the Dell XPS 13 specifically does, but it is very likely.
This Me and My Dell manual (Using numeric keypad on a laptop) seems to explain its usage for all Dell laptops.
Use copy and paste (copy the character from some place and paste in the editor). A clipboard manager might help you if you choose to go this way.
You might also use some third-party software to have that character emitted when you press a key or shortcut, but I guess that is included in your "third party automation scripting softwares" prescription.
Use the unicode combination! I now found out that with that one you can use indifferently both numbers from the keypad and normal ones !
Unfortunately it still requires the numpad's "plus" (add) key, so you need to be able to type at least that.
See Insert Unicode characters via the keyboard? or https://en.wikipedia.org/wiki/Unicode_input to learn how to enable the combination, if it is not already enabled.
If there indeed exist laptops with no numeric keypad support unfortunately the Windows developers didn't fully anticipate for that; it probably wouldn't take much and wouldn't have negative repercussions for Windows to support the insertion via the normal numeric keys (or the normal + for the Unicode combination), but for now it's not supported (as far as I know).
It would be a bad mistake on the part of the laptops' developers to not include any way to type the numpad keys, though, as they are required by many programs.

I can't input certain characters on the PHPStorm Terminal

I'm currently using JetBrains' PHPStorm IDE and I'm having problems using the embedded terminal with a Portuguese Keyboard (correctly set up on Windows). I can't input certain characters like "[", "{" or "]", which I can only access using the "Alt Gr" key, despite characters common too all keyboard layouts working just fine.
Is there any way to fix this? I'm forced to use the windows console to perform certain tasks because of this problem, which makes the IDE terminal a bit useless to me.
It's a known issue that is fixed already.
You will have to wait till next update (v2016.1.1) will be publicly available -- it's expected to be somewhere in a week time (no precise date for the moment, unfortunately).
In meantime you can either use English keyboard layout ... or keep using external console app.

Dreamweaver CS6 Auto-Closing apostrophe issue

Just upgraded from Dreamweaver CS5.5 to Dreamweaver CS6, and this is a little thing, but its really starting to grate:
In CS5.5 whenever I opened apostrophes, it would auto-complete the closing apostrophe. Then whilst typing if I typed the closing apostrophe it would just skip past the auto-completed closing apostrophe.
eg: class="page"| <--being the cursor
In CS6 however, when I type to the closing apostrophe it adds another apostrophe without skipping past the auto-completed closing apostrophe.
eg: class="page"|" <-- the exact same sequence of keys typed as above, but results in this.
Is there any way to get CS6 mimicking the same behaviour as CS5.5?
Yeah this is possible, but I'm not using my windows machine right now (I'm in linux).
I'll go back home and follow up immediately, but to the best of my memory the options are in
Edit -> Preferences
After that I think it was in "Code Hints"
One of the options there has the solution to your problem.
Note on Dell/ASUS Machines
Dell and ASUS sometimes implement this 'feature' where if you press ", it gets autocompleted. This interferes with dreamweaver. Then the only solution is to simply turn off code hints.. sorry.. :(

how to type single quote in J gtk terminal under Windows 7

I just started programming J. Now I want to type
text=: 'hello world'
text
in the gtk terminal, which when run should display:
hello world
But when I type the single quote character it renders as ´, not as ' in the gtk terminal. And then when I run the program the interpreter says "spelling error".
Now the only way I can put a ' in the terminal is by typing it in notepad and pasting it in the gtk terminal. I find that cumbersome.
Now my question is:
Is there an easier way to type a ' in the gtk terminal?
I have Windows 7 64 bits version, also 64 bits version of J, version j64-701.
I just encountered this problem as well, and it appears that this is caused by a keyboard setting (controlling whether quotes appear directly or can be used to make é, ë and the like).
This setting can be changed in almost all Windows applications by pressing Left Alt + Shift. After using this combination, the single quotes appeared correctly for me.
HTH.
I've faced exactly the same problem and I found out that it happens in every software that uses GTK+ (Pidgin, GIMP, Geany, etc), if you have set your keyboard to English-International, when you press the single quote(')/double quote(") key, what you get is acute accent(´)/diacritic(¨).
The best solution to me was, adding the English-US keyboard to the list of available keyboards in Windows (yes, this solution is for windows but you can easily do something similar in any SO you are facing the same problem).
And when I want to input an [ ' ], I just press the default combination LEFT CONTROL + SHIFT to toggle between keyboards.
Long shot, but I'm guessing it's a keyboard thing. My French keyboard has a funky layout, and yours (I'm guessing Dutch?) might have one too. I guess I'm lucky, under Vista 64, I get single quotes, with the right key.
I think it's a bug of the specific version of J. I will ask this question to the support of the producers of J.

Resources