root / test / gr / ebs / gss / web / client / selenium / ide / tests / IDERightClick.java @ af6aa461
History | View | Annotate | Download (2 kB)
1 |
/*
|
---|---|
2 |
* Copyright 2011 Electronic Business Systems Ltd.
|
3 |
*
|
4 |
* This file is part of GSS.
|
5 |
*
|
6 |
* GSS is free software: you can redistribute it and/or modify
|
7 |
* it under the terms of the GNU General Public License as published by
|
8 |
* the Free Software Foundation, either version 3 of the License, or
|
9 |
* (at your option) any later version.
|
10 |
*
|
11 |
* GSS is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with GSS. If not, see <http://www.gnu.org/licenses/>.
|
18 |
*/
|
19 |
package gr.ebs.gss.web.client.selenium.ide.tests; |
20 |
|
21 |
import org.junit.After; |
22 |
import org.junit.Before; |
23 |
import org.junit.Test; |
24 |
|
25 |
import com.thoughtworks.selenium.*; |
26 |
|
27 |
public class IDERightClick extends SeleneseTestCase{ |
28 |
|
29 |
/**
|
30 |
* TIP:
|
31 |
* 1. First kill an already-running instance of the Selenium server.
|
32 |
* netstat -anp | grep 4444 / kill -9 <pid>
|
33 |
* 2. Start the Selenium RC serve in the dependencies directory
|
34 |
* java -jar selenium-server-standalone-2.0b1.jar
|
35 |
* 3. The third argument can be either "*firefox" or "*chrome",
|
36 |
*/
|
37 |
|
38 |
@Before
|
39 |
public void setUp() throws Exception { |
40 |
selenium = new DefaultSelenium("localhost", 4444, "*firefox", "http://127.0.0.1:8080/pithos/login?next=http://127.0.0.1:8080/pithos/"); |
41 |
// setUp("http://127.0.0.1:8080/pithos/login?next=http://127.0.0.1:8080/pithos/", "*firefox");
|
42 |
|
43 |
selenium.start(); |
44 |
} |
45 |
|
46 |
@After
|
47 |
public void tearDown() throws Exception { |
48 |
selenium.stop(); |
49 |
} |
50 |
|
51 |
@Test
|
52 |
public void testRestoreTrash() throws Exception { |
53 |
// selenium.open("/pithos/#Files");
|
54 |
selenium.open("http://127.0.0.1:8080/pithos/login?next=http://127.0.0.1:8080/pithos/");
|
55 |
selenium.waitForPageToLoad("300000");
|
56 |
selenium.click("lakis@ebs.gr");
|
57 |
selenium.contextMenuAt("Trash", ""); |
58 |
// selenium.click("folderContextMenu.restore");
|
59 |
selenium.click("folderContextMenu.emptyTrash");
|
60 |
|
61 |
} |
62 |
|
63 |
} |