When I try to access the TextField.Readonly
property from WatiN at runtime, an error is thrown because WatiN attempts to parse 'readonly' as a boolean. I also encountered a similar issue with the 'selected' attribute of the <option>
element.
I find it hard to believe that nobody else has encountered these basic scenarios using WatiN which makes me think I am missing something obvious. Is there a known way to work around these issues or is this a known issue with WatiN?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
此问题与 IE9 在 IE9 模式下显示的页面与 IE9 在 IE8 模式(以及旧版 IE)的行为方式有很大不同有关。这些问题已在 WatiN 2.1 中得到修复
This issue has to do with IE9 showing a page in IE9mode differs greatly from how IE9 in IE8mode (and older versions of IE) behaves. These problems have been fixed in WatiN 2.1
根据 w3c 学校的说法,您提到的 readonly="readonly" 语法绝对是正确的,看起来您确实发现了一个错误。
查看第 57 行中的 /trunk/src/Core/TextField.cs 代码,
因此您可能应该将其更改为类似这样的内容,尽管我没有使用花哨的 ?和:语法:-)
The syntax of readonly="readonly" that you mention is definitely correct according to w3c school and it looks like you have indeed found a bug.
Looking at /trunk/src/Core/TextField.cs in line 57 the code is
so you should probably just change it to something like this, although I am not using the fancy ? and : syntax :-)