← Back to team overview

sikuli-driver team mailing list archive

[Bug 695650] Re: X 1.0rc1: find(text).text() does not return same text

 

** Description changed:

  all systems
  
  when saying: (I suppose it is found)
  t = "some-text"
  m = find(t)
- if m.text() == t:
-    print "OK: exact match"
+ if m.text().strip() == t:
+    print "OK: exact match"
  else:
-    print "Missed: one or more characters misread"
+    print "Missed: one or more characters misread"
  
- In most cases (not to say all) you will get the "Missed".
+ In many cases (not to say most) you will get the "Missed".
  
  but when using:
  ...
- if m.nearby(1).text() == t: 
+ if m.nearby(1).text().strip() == t:
  ...
  
  you will get OK in most cases (not all - look bug 695616).
  I guess this is a problem with some inconsistency in the internal use of the region boundary.
+ 
+ comment on text().strip():
+ is needed, because of trailing x'0A20' (linefeed blank) see bug 701005

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/695650

Title:
  X 1.0rc1: find(text).text() does not return same text

Status in Sikuli:
  New

Bug description:
  all systems

when saying: (I suppose it is found)
t = "some-text"
m = find(t)
if m.text().strip() == t:
   print "OK: exact match"
else:
   print "Missed: one or more characters misread"

In many cases (not to say most) you will get the "Missed".

but when using:
...
if m.nearby(1).text().strip() == t:
...

you will get OK in most cases (not all - look bug 695616).
I guess this is a problem with some inconsistency in the internal use of the region boundary.

comment on text().strip():
is needed, because of trailing x'0A20' (linefeed blank) see bug 701005







References