Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [swtbot-dev] CTabFolders?

Thanks I'll try that. Looks like an entry point into the finder stuff for me too, so that will be useful.

BTW, I am just loading the .jar into jruby. Where can I put a .keyboard file so that swtbot will find it? I'm on MAC_EN.GB

On Friday, 26 August 2011 at 15:13, Ketan Padegaonkar wrote:

On Fri, Aug 26, 2011 at 3:57 AM, Daniel Lucraft <dan@xxxxxxxxxxxxxxxxx> wrote:
> is there a way to get CTabFolders in Swtbot? You can get a CTabItem and go
> up from there, but I'd like to assert, for instance, that the CTabFolder is
> empty.

SWTBot never supported (C)TabFolders because there's nothing one could do with it (until now ;)

You could try reopening the SWTBot class to add this:

class SWTBot
  def tab_folder?
    finder.find_controls(of_type(CTabFolder.class)).any?
  end

  def method_missing(method, *args, &blk)
    klass = [
      org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory,
      org.eclipse.swtbot.swt.finder.utils.SWTUtils].find { |k| k.respond_to?(method) }

    return klass.send(method, *args, &blk) if klass
    super
  end
_______________________________________________
swtbot-dev mailing list
swtbot-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/swtbot-dev


Back to the top