aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/test/java/com/vaadin/tests/components/upload/UploadTitleWithTooltipTest.java
blob: be61634c28dac57d94b2240ff1a5ca9bd36873a3 (plain)
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
package com.vaadin.tests.components.upload;

import static org.junit.Assert.assertNotNull;

import java.util.List;

import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;

import com.vaadin.tests.tb3.TooltipTest;

/**
 * Test for check visibility of browser-dependent tootlip for Upload component.
 *
 * @author Vaadin Ltd
 */
public class UploadTitleWithTooltipTest extends TooltipTest {

    @Test
    public void testDropdownTable() throws Exception {
        openTestURL();

        List<WebElement> elements = findElements(By.tagName("input"));
        WebElement input = null;
        for (WebElement element : elements) {
            if ("file".equals(element.getAttribute("type"))) {
                input = element;
            }
        }

        assertNotNull("Input element with type 'file' is not found", input);

        checkTooltip(input, "tooltip");

        compareScreen("init");
    }

}