”“xD8;”作为 C# 中的输入
我正在工作中致力于自动化 GUI 测试。我目前陷入了像插入字符“ø”这样愚蠢的事情,这是我语言的一个字母。
方法调用如下:_atlas.AvailabilityRadioSearch.InsertAddressAddress("kjøita");
这应该会自动填写网页上标准文本框中的值。但是,我似乎无法正确理解。结果总是“kj?ita”。
有人知道我该如何解决这个问题吗?
哦,顺便说一句;
请不要关心蹩脚的方法和类名,因为这只是为了测试目的而不是被其他人使用:)
I'm working on automating GUI-testing at my job. I'm currently stuck at something as silly as inserting the character "ø", which is a letter of my language.
The method-call is as follows:_atlas.AvailabilityRadioSearch.InsertAddressAddress("kjøita");
This is supposed to automatically fill in the value in a standard textbox on the webpage. But, I can't seem to get it right. It always turns out "kj?ita".
Does anybody know how I can go about fixing this?
Oh, and btw;
Please do not care about the crappy method- and classnames, as this is just for testing-purposes and not to be used by anyone else :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您需要将 'ø' 更改为
ø
You need to change 'ø' into
ø
考虑在您的页面上设置 UI 文化/文化:
web.config
页面
将 FR-CH 替换为您的特定语言文化,您应该可以开始了。
MSDN UI 文化/ASP.NET 文化
显示ASP.NET 文本框中的法语
UI 文化价值观列表(例如 FR-CH)
Think about setting the UI Culture/Culture on your page:
web.config
Page
Replace FR-CH with your specific language culture and you should be good to go.
MSDN UI Culture/Culture for ASP.NET
Displaying French in ASP.NET Textbox
List of UI Culture values (eg FR-CH)
刚刚测试了这个,它可以工作,尽管很笨重:
Just tested this and it works, despite being clunky: