Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 45 lines (38 sloc) 1.36 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
/*******************************************************************************
* Copyright (c) 2008 Cedric Chabanois and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Cedric Chabanois - initial API and implementation
*******************************************************************************/
package org.eclipse.swtbot.swt.finder.widgets;

import static org.junit.Assert.assertEquals;

import org.eclipse.jface.snippets.viewers.Snippet009CellEditors;
import org.eclipse.swtbot.swt.finder.UIThread;
import org.eclipse.swtbot.swt.finder.test.AbstractSWTTest;
import org.junit.Test;

/**
* @author Cedric Chabanois <cchabanois [at] no-log [dot] org>
* @version $Id$
* @since 1.2
*/
public class SWTBotTableClickTest extends AbstractSWTTest {

@Test
public void clickOnCell() throws Exception {
SWTBotTable table = bot.table();
table.click(0, 0);
bot.sleep(1000);
bot.text("0", 0).setText("101");
bot.sleep(1000);
table.click(1, 0);
bot.sleep(1000);
assertEquals("Item 101", table.cell(0, 0));
}

@UIThread
public void runUIThread() {
Snippet009CellEditors.main(new String[0]);
}

}
Something went wrong with that request. Please try again.