Package org.openqa.selenium.interactions

Examples of org.openqa.selenium.interactions.Keyboard


    }

    public static class ActionsProvider extends IndirectProvider<Actions, HasInputDevices> {
        @Override
        public Actions generateProxy(HasInputDevices base) {
            Keyboard keyboard = base.getKeyboard();
            Mouse mouse = base.getMouse();
            return new Actions(keyboard, mouse);
        }
View Full Code Here


    @Mock(extraInterfaces = HasInputDevices.class)
    WebDriver driver;

    @Before
    public void setUp() {
        when(((HasInputDevices) driver).getKeyboard()).thenReturn(new Keyboard() {
            @Override
            public void sendKeys(CharSequence... keysToSend) {
                throw new UnsupportedOperationException("Not supported yet.");
            }
View Full Code Here

    @Test
    public void testActionsProviderLookup() {
        // having
        ActionsProvider provider = new ActionsProvider();
        Mouse mouse = mock(Mouse.class);
        Keyboard keyboard = mock(Keyboard.class);
        when(((HasInputDevices) driver).getMouse()).thenReturn(mouse);
        when(((HasInputDevices) driver).getKeyboard()).thenReturn(keyboard);
        // when
        Actions actions = (Actions) provider.lookup(null, null);
        actions.click().perform();
View Full Code Here

    String message = "Francois 1234";

    UIATextField textfield = getTextField();
    textfield.tap();

    Keyboard keyboard = driver.getKeyboard();
    keyboard.sendKeys(message);

    Assert.assertEquals(textfield.getValue(), message);
  }
View Full Code Here

TOP

Related Classes of org.openqa.selenium.interactions.Keyboard

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.