watir see whether the text in the value of certain coding?
ie.div (: id, 'alertbox-con'). p (: index, 0). text.force_encoding ("UTF-8"). valid_encoding?
Or
ie.div (: id, 'alertbox-con'). p (: index, 0). text.force_encoding ("GBK"). valid_encoding?
If it returns true, returns false
Another method is more simple to query whether a particular encoding:
ie.div (: id, 'alertbox-con'). p (: index, 0). text.encoding
Return should be coded format
没有评论:
发表评论