After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 345858 - gettextproperty function returns nothing if startpos is > 0
gettextproperty function returns nothing if startpos is > 0
Status: RESOLVED FIXED
Product: LDTP
Classification: Other
Component: ldtp
0.4.x
Other All
: Normal normal
: ---
Assigned To: Prashanth Mohan
LDTP Development Mailing List
Depends on:
Blocks:
 
 
Reported: 2006-06-25 08:52 UTC by srinivas
Modified: 2006-07-06 17:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The arguments given to AccessibleText_getAttributes was wrong (1.60 KB, patch)
2006-06-25 09:07 UTC, Prashanth Mohan
committed Details | Review

Description srinivas 2006-06-25 08:52:41 UTC
Please describe the problem:
The function gettextproperty (Syntax : gettextproperty(windowName, componentName, startPosition=None, endPosition=None)) does not return anything when the start position is greater than 0 (i.e text is not at start of the box), even when text forecolor or backcolor is changed.


Steps to reproduce:
1. Open gedit, type some text
2. Search for some text, such that the text is not at the start of the document.The text should be highlighted now.
3. in a python shell, type from ldtp import * and gettextproperty('*gedit','txt0',5,10) (assuming the text searched for in gedit was from position 5 to position 10)


Actual results:
No output from gettextproperty

Expected results:
output should be bg-color:65535,65535,30840 .. (gedit 2.14 uses yellow color to highlight a search term).. U can get this output if u search for some text at the start of the document, and specifying start position as 0

Does this happen every time?
every

Other information:
Comment 1 Prashanth Mohan 2006-06-25 09:07:28 UTC
Created attachment 67966 [details] [review]
The arguments given to AccessibleText_getAttributes was wrong

AccessibleText_getAttributes doesn't seem to be taking the end position i.e. the diff value into account. It only check the start position