How can I get a TableItem's text? [message #549932] |
Wed, 28 July 2010 09:48  |
Eclipse User |
|
|
|
In my SWTBot 'script' I have selected a TableItem. In the debugger, I can see that the SWTBotTableItem has a widget that is the underlying TableItem. However, if I add some code to cast the widget and invoke the getText() method, I get an exception for an invalid thread access (this is also what the debugger shows, when the widget is selected).
I tried using a Display.getCurrent().syncExec() to run this code, but it never got invoked.
Is what I am trying to do possible?
Regards, John
|
|
|
Re: How can I get a TableItem's text? [message #549999 is a reply to message #549932] |
Wed, 28 July 2010 13:17  |
Eclipse User |
|
|
|
An SWTBotTableItem is a wrapper for TableItem that represents a row.
To get text in a particular you can use either:
table.cell(row, columIndex_or_header_string)
OR
tableItem.getText(columnIndex)
--
Ketan
http://ketan.padegaonkar.name | http://eclipse.org/swtbot
On 7/28/10 6:48 AM, John Ormerod wrote:
> In my SWTBot 'script' I have selected a TableItem. In the debugger, I
> can see that the SWTBotTableItem has a widget that is the underlying
> TableItem. However, if I add some code to cast the widget and invoke the
> getText() method, I get an exception for an invalid thread access (this
> is also what the debugger shows, when the widget is selected).
>
> I tried using a Display.getCurrent().syncExec() to run this code, but it
> never got invoked.
>
> Is what I am trying to do possible?
>
> Regards, John
|
|
|
Powered by
FUDForum. Page generated in 0.02977 seconds