org.openqa.selenium.interactions.Actions#moveToElement ( )源码实例Demo

下面列出了org.openqa.selenium.interactions.Actions#moveToElement ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

private void goToParticularPostPage(String title) {
    List<WebElement> allPosts
            = postsContainer.findElements(By.className("title"));
    for (WebElement ele : allPosts) {
        if (ele.getText().equals(title)) {
            Actions builder = new Actions(driver);
            builder.moveToElement(ele);
            builder.click(driver.findElement(
                    By.cssSelector(".edit>a")));
            // Generate the composite action.
            Action compositeAction = builder.build();
            // Perform the composite action.
            compositeAction.perform();
            break;
        }
    }
}
 
源代码2 项目: AisAbnormal   文件: StatisticDataIT.java
private void clickOnACell() throws InterruptedException {
    zoomIntoHelsinore();
    waitForCellsToBeDisplayed();

    WebElement map = getMap();

    Actions actions = new Actions(browser);
    actions.moveToElement(map, map.getSize().getWidth() / 2, map.getSize().getHeight() / 2);
    actions.click();
    actions.perform();

    // Cursor position is exactly in the center of the map
    browser.findElement(By.id("tab-map")).click();
    assertEquals("(56°02'05.7\"N, 12°38'59.7\"E)", browser.findElement(By.cssSelector("div#cursorpos.useroutput p")).getText());

    // Assert statistic data for correct cell displayed
    final String expectedCellInfo = "Cell id 6249302540 (56°02'06.5\"N,12°38'53.8\"E) - (56°02'00\"N,12°39'00.3\"E)";
    By actualCellInfoElement = By.cssSelector("div.cell-data-contents > h5");
    wait.until(ExpectedConditions.textToBePresentInElement(actualCellInfoElement, expectedCellInfo));
}
 
源代码3 项目: bdt   文件: SeleniumSpec.java
/**
 * Delete or replace the text on a numbered {@code index} previously found element.
 *
 * @param index
 */
@When("^I delete the text '(.+?)' on the element on index '(\\d+)'( and replace it for '(.+?)')?$")
public void seleniumDelete(String text, Integer index, String replacement) {
    assertThat(this.commonspec, scenario, commonspec.getPreviousWebElements()).as("There are less found elements than required")
            .hasAtLeast(index);

    Actions actions = new Actions(commonspec.getDriver());
    actions.moveToElement(commonspec.getPreviousWebElements().getPreviousWebElements().get(index), (text.length() / 2), 0);
    for (int i = 0; i < (text.length() / 2); i++) {
        actions.sendKeys(Keys.ARROW_LEFT);
        actions.build().perform();
    }
    for (int i = 0; i < text.length(); i++) {
        actions.sendKeys(Keys.DELETE);
        actions.build().perform();
    }
    if (replacement != null && replacement.length() != 0) {
        actions.sendKeys(replacement);
        actions.build().perform();
    }
}
 
源代码4 项目: bdt   文件: SeleniumSpec.java
/**
 * Type a {@code text} on an numbered {@code index} previously found element.
 *
 * @param nullablestring
 * @param index
 */
@When("I type {string} on the element on index '{int}'")
public void seleniumType(String nullablestring, Integer index) {
    String text = NullableString.transform(nullablestring);
    assertThat(this.commonspec, scenario, commonspec.getPreviousWebElements()).as("There are less found elements than required")
            .hasAtLeast(index);
    while (text.length() > 0) {
        Actions actions = new Actions(commonspec.getDriver());
        if (-1 == text.indexOf("\\n")) {
            actions.moveToElement(commonspec.getPreviousWebElements().getPreviousWebElements().get(index));
            actions.click();
            actions.sendKeys(text);
            actions.build().perform();
            text = "";
        } else {
            actions.moveToElement(commonspec.getPreviousWebElements().getPreviousWebElements().get(index));
            actions.click();
            actions.sendKeys(text.substring(0, text.indexOf("\\n")));
            actions.build().perform();
            text = text.substring(text.indexOf("\\n") + 2);
        }
    }
}
 
源代码5 项目: htmlunit   文件: HTMLSelectElementTest.java
/**
 * @throws Exception if an error occurs
 */
@Test
@Alerts("mouse over")
@BuggyWebDriver(FF = "mouse overmouse overmouse over",
        FF60 = "mouse overmouse overmouse overmouse over",
        FF68 = "mouse overmouse overmouse over")
public void mouseOver() throws Exception {
    final String html =
        "<html>\n"
        + "  <head>\n"
        + "    <script>\n"
        + "    function doTest() {\n"
        + "      document.title += 'mouse over';\n"
        + "    }\n"
        + "    </script>\n"
        + "  </head>\n"
        + "<body>\n"
        + "  <form id='form1'>\n"
        + "    <select name='select1' id='select1' size='4' onmouseover='doTest()'>\n"
        + "      <option value='option1' id='option1' >Option1</option>\n"
        + "      <option value='option2' id='option2'>Option2</option>\n"
        + "    </select>\n"
        + "  </form>\n"
        + "</body></html>";

    final WebDriver driver = loadPage2(html);
    final Actions actions = new Actions(driver);
    actions.moveToElement(driver.findElement(By.id("select1")));
    actions.perform();
    Thread.sleep(400);

    assertTitle(driver, getExpectedAlerts()[0]);
}
 
源代码6 项目: htmlunit   文件: HTMLSelectElementTest.java
/**
 * @throws Exception if an error occurs
 */
@Test
@Alerts(DEFAULT = "",
        FF = "mouse over",
        FF68 = "mouse over",
        FF60 = "mouse over")
@BuggyWebDriver(FF = "mouse overmouse overmouse over",
        FF68 = "mouse overmouse overmouse over",
        FF60 = "mouse overmouse overmouse over")
public void mouseOverDisabledSelect() throws Exception {
    final String html =
        "<html>\n"
        + "  <head>\n"
        + "    <script>\n"
        + "    function doTest() {\n"
        + "      document.title += 'mouse over';\n"
        + "    }\n"
        + "    </script>\n"
        + "  </head>\n"
        + "<body>\n"
        + "  <form id='form1'>\n"
        + "    <select name='select1' id='select1' size='4' onmouseover='doTest()' disabled='disabled'>\n"
        + "      <option value='option1' id='option1'>Option1</option>\n"
        + "      <option value='option2' id='option2'>Option2</option>\n"
        + "    </select>\n"
        + "  </form>\n"
        + "</body></html>";

    final WebDriver driver = loadPage2(html);
    final Actions actions = new Actions(driver);
    actions.moveToElement(driver.findElement(By.id("select1")));
    actions.perform();
    Thread.sleep(400);

    assertTitle(driver, getExpectedAlerts()[0]);
}
 
源代码7 项目: htmlunit   文件: HTMLElement2Test.java
/**
 * @throws Exception if an error occurs
 */
@Test
@Alerts({"clicked", "fireEvent not available"})
public void fireEvent_WithoutTemplate() throws Exception {
    final String html =
        "<html>\n"
        + "  <head>\n"
        + "    <title>Test</title>\n"
        + "    <script>\n"
        + "    function doTest() {\n"
        + "      var elem = document.getElementById('a');\n"
        + "      if (!elem.fireEvent) { alert('fireEvent not available'); return }\n"
        + "      elem.fireEvent('onclick');\n"
        + "    }\n"
        + "    </script>\n"
        + "  </head>\n"
        + "<body>\n"
        + "  <div id='a' onclick='alert(\"clicked\")'>foo</div>\n"
        + "  <div id='b' onmouseover='doTest()'>bar</div>\n"
        + "</body></html>";

    final WebDriver driver = loadPage2(html);
    driver.findElement(By.id("a")).click();
    verifyAlerts(driver, getExpectedAlerts()[0]);

    final Actions actions = new Actions(driver);
    actions.moveToElement(driver.findElement(By.id("b")));
    actions.perform();
    verifyAlerts(driver, getExpectedAlerts()[1]);
}
 
源代码8 项目: BHBot   文件: BrowserManager.java
synchronized void moveMouseToPos(int x, int y) {
    try {
        Actions act = new Actions(driver);
        Point movePos = getChromeOffset(x, y);

        act.moveToElement(game, movePos.x, movePos.y);
        act.perform();
    } catch (Exception e) {
        // do nothing
    }
}
 
源代码9 项目: BHBot   文件: BrowserManager.java
synchronized void clickInGame(int x, int y) {
    Point clickCoordinates = getChromeOffset(x, y);
    Point awayCoordinates = getChromeOffset(0, 0);
    Actions act = new Actions(driver);

    act.moveToElement(game, clickCoordinates.x, clickCoordinates.y);
    act.click();
    // so that the mouse doesn't stay on the button, for example. Or else button will be highlighted and cue won't get detected!
    act.moveToElement(game, awayCoordinates.x, awayCoordinates.y);
    act.perform();
}
 
源代码10 项目: rice   文件: LibraryControlCheckboxDefaultAft.java
protected void actionSendKeysArrowDown(String id) {
    Actions actions = new Actions(driver);
    actions.moveToElement(driver.findElement(By.id(id)));
    actions.click();
    actions.sendKeys(Keys.ARROW_DOWN);
    actions.build().perform();
}
 
源代码11 项目: senbot   文件: NavigationService.java
/**
 * Hovers the mouse over the given element
 * @param locator The element locator
 */
public void mouseHoverOverElement(By locator) {
    SynchronisationService synchronisationService = new SynchronisationService();

    synchronisationService.waitAndAssertForExpectedCondition(ExpectedConditions.visibilityOfElementLocated(locator));

    WebElement element = getWebDriver().findElement(locator);
    Actions builder = new Actions(getWebDriver());
    Actions hoverOverRegistrar = builder.moveToElement(element);
    hoverOverRegistrar.perform();
}
 
源代码12 项目: htmlunit   文件: HTMLInputElementTest.java
private void mouseOver(final String element) throws Exception {
    final String html =
        HtmlPageTest.STANDARDS_MODE_PREFIX_
        + "<html>\n"
        + "  <head>\n"
        + "    <script>\n"
        + "    function dumpEvent(event) {\n"
        + "      // target\n"
        + "      var eTarget;\n"
        + "      if (event.target) {\n"
        + "        eTarget = event.target;\n"
        + "      } else if (event.srcElement) {\n"
        + "        eTarget = event.srcElement;\n"
        + "      }\n"
        + "      // defeat Safari bug\n"
        + "      if (eTarget.nodeType == 3) {\n"
        + "        eTarget = eTarget.parentNode;\n"
        + "      }\n"
        + "      var msg = 'mouse over';\n"
        + "      if (eTarget.name) {\n"
        + "        msg = msg + ' [' + eTarget.name + ']';\n"
        + "      } else {\n"
        + "        msg = msg + ' [' + eTarget.id + ']';\n"
        + "      }\n"
        + "      document.title+= msg;\n"
        + "    }\n"
        + "    </script>\n"
        + "  </head>\n"
        + "<body>\n"
        + "  <form id='form1'>\n"
        + "    " + element + "\n"
        + "  </form>\n"
        + "</body></html>";

    final WebDriver driver = loadPage2(html);

    final Actions actions = new Actions(driver);
    actions.moveToElement(driver.findElement(By.id("tester")));
    actions.perform();

    assertTitle(driver, getExpectedAlerts()[0]);
}
 
源代码13 项目: htmlunit   文件: HTMLTextAreaElementTest.java
private void mouseOver(final String element) throws Exception {
    final String html =
        HtmlPageTest.STANDARDS_MODE_PREFIX_
        + "<html>\n"
        + "  <head>\n"
        + "    <script>\n"
        + "    function dumpEvent(event) {\n"
        + "      // target\n"
        + "      var eTarget;\n"
        + "      if (event.target) {\n"
        + "        eTarget = event.target;\n"
        + "      } else if (event.srcElement) {\n"
        + "        eTarget = event.srcElement;\n"
        + "      }\n"
        + "      // defeat Safari bug\n"
        + "      if (eTarget.nodeType == 3) {\n"
        + "        eTarget = eTarget.parentNode;\n"
        + "      }\n"
        + "      var msg = 'mouse over';\n"
        + "      if (eTarget.name) {\n"
        + "        msg = msg + ' [' + eTarget.name + ']';\n"
        + "      } else {\n"
        + "        msg = msg + ' [' + eTarget.id + ']';\n"
        + "      }\n"
        + "      document.title += msg;\n"
        + "    }\n"
        + "    </script>\n"
        + "  </head>\n"
        + "<body>\n"
        + "  <form id='form1'>\n"
        + "    " + element + "\n"
        + "  </form>\n"
        + "</body></html>";

    final WebDriver driver = loadPage2(html);

    final Actions actions = new Actions(driver);
    actions.moveToElement(driver.findElement(By.id("tester")));
    actions.perform();

    assertTitle(driver, getExpectedAlerts()[0]);
}
 
源代码14 项目: htmlunit   文件: HTMLOptionElement2Test.java
/**
 * @throws Exception if an error occurs
 */
@Test
@Alerts(DEFAULT = {"o-mouse over [option1]", "s-mouse over [option1]"},
        IE = {})
public void mouseOver() throws Exception {
    shutDownRealIE();

    final String html =
        HtmlPageTest.STANDARDS_MODE_PREFIX_
        + "<html>\n"
        + "  <head>\n"
        + "    <title>Test</title>\n"
        + "    <script>\n"
        + "    function dumpEvent(event, pre) {\n"
        + "      // target\n"
        + "      var eTarget;\n"
        + "      if (event.target) {\n"
        + "        eTarget = event.target;\n"
        + "      } else if (event.srcElement) {\n"
        + "        eTarget = event.srcElement;\n"
        + "      }\n"
        + "      // defeat Safari bug\n"
        + "      if (eTarget.nodeType == 3) {\n"
        + "        eTarget = eTarget.parentNode;\n"
        + "      }\n"
        + "      var msg = pre + '-mouse over';\n"
        + "      if (eTarget.name) {\n"
        + "        msg = msg + ' [' + eTarget.name + ']';\n"
        + "      } else {\n"
        + "        msg = msg + ' [' + eTarget.id + ']';\n"
        + "      }\n"
        + "      alert(msg);\n"
        + "    }\n"
        + "    </script>\n"
        + "  </head>\n"
        + "<body>\n"
        + "  <form id='form1'>\n"
        + "    <select name='select1' id='select1' size='2' onmouseover='dumpEvent(event, \"s\");' >\n"
        + "      <option value='option1' id='option1' onmouseover='dumpEvent(event, \"o\");' >Option1</option>\n"
        + "      <option value='option2' id='option2'>Option2</option>\n"
        + "    </select>\n"
        + "  </form>\n"
        + "</body></html>";

    final WebDriver driver = loadPage2(html);
    final Actions actions = new Actions(driver);
    actions.moveToElement(driver.findElement(By.id("option1")));
    actions.perform();

    verifyAlerts(driver, getExpectedAlerts());
}
 
源代码15 项目: htmlunit   文件: HTMLOptionElement2Test.java
/**
 * @throws Exception if an error occurs
 */
@Test
@Alerts(DEFAULT = "o-mouse over [option1]",
        FF = "o-mouse over [option1] s-mouse over [option1]",
        FF68 = "o-mouse over [option1] s-mouse over [option1]",
        FF60 = "o-mouse over [option1] s-mouse over [option1]",
        IE = "")
public void mouseOverDisabledSelect() throws Exception {
    final String html =
        HtmlPageTest.STANDARDS_MODE_PREFIX_
        + "<html>\n"
        + "  <head>\n"
        + "    <script>\n"
        + "    function dumpEvent(event, pre) {\n"
        + "      // target\n"
        + "      var eTarget;\n"
        + "      if (event.target) {\n"
        + "        eTarget = event.target;\n"
        + "      } else if (event.srcElement) {\n"
        + "        eTarget = event.srcElement;\n"
        + "      }\n"
        + "      // defeat Safari bug\n"
        + "      if (eTarget.nodeType == 3) {\n"
        + "        eTarget = eTarget.parentNode;\n"
        + "      }\n"
        + "      var msg = pre + '-mouse over';\n"
        + "      if (eTarget.name) {\n"
        + "        msg = msg + ' [' + eTarget.name + ']';\n"
        + "      } else {\n"
        + "        msg = msg + ' [' + eTarget.id + ']';\n"
        + "      }\n"
        + "      document.title += ' ' + msg;\n"
        + "    }\n"
        + "    </script>\n"
        + "  </head>\n"
        + "<body>\n"
        + "  <form id='form1'>\n"
        + "    <select name='select1' id='select1' size='2' disabled='disabled' "
                        + "onmouseover='dumpEvent(event, \"s\");' >\n"
        + "      <option value='option1' id='option1' onmouseover='dumpEvent(event, \"o\");'>Option1</option>\n"
        + "      <option value='option2' id='option2'>Option2</option>\n"
        + "    </select>\n"
        + "  </form>\n"
        + "</body></html>";

    final WebDriver driver = loadPage2(html);
    final Actions actions = new Actions(driver);
    actions.moveToElement(driver.findElement(By.id("option1")));
    actions.perform();

    assertTitle(driver, getExpectedAlerts()[0]);
}
 
源代码16 项目: htmlunit   文件: HTMLOptionElement2Test.java
/**
 * @throws Exception if an error occurs
 */
@Test
@Alerts(DEFAULT = "",
        FF = "s-mouse over [select1] o-mouse over [option1] s-mouse over [option1]",
        FF68 = "s-mouse over [select1] o-mouse over [option1] s-mouse over [option1]",
        FF60 = "s-mouse over [select1] o-mouse over [option1] s-mouse over [option1]")
public void mouseOverDisabledOption() throws Exception {
    final String html =
        HtmlPageTest.STANDARDS_MODE_PREFIX_
        + "<html>\n"
        + "  <head>\n"
        + "    <title></title>\n"
        + "    <script>\n"
        + "    function dumpEvent(event, pre) {\n"
        + "      // target\n"
        + "      var eTarget;\n"
        + "      if (event.target) {\n"
        + "        eTarget = event.target;\n"
        + "      } else if (event.srcElement) {\n"
        + "        eTarget = event.srcElement;\n"
        + "      }\n"
        + "      // defeat Safari bug\n"
        + "      if (eTarget.nodeType == 3) {\n"
        + "        eTarget = eTarget.parentNode;\n"
        + "      }\n"
        + "      var msg = pre + '-mouse over';\n"
        + "      if (eTarget.name) {\n"
        + "        msg = msg + ' [' + eTarget.name + ']';\n"
        + "      } else {\n"
        + "        msg = msg + ' [' + eTarget.id + ']';\n"
        + "      }\n"
        + "      if (msg.length == 0) { msg = '-' };\n"
        + "      document.title += ' ' + msg;\n"
        + "    }\n"
        + "    </script>\n"
        + "  </head>\n"
        + "<body>\n"
        + "  <form id='form1'>\n"
        + "    <select name='select1' id='select1' size='2' onmouseover='dumpEvent(event, \"s\");' >\n"
        + "      <option value='option1' id='option1' onmouseover='dumpEvent(event, \"o\");' "
                            + "disabled='disabled'>Option1</option>\n"
        + "      <option value='option2' id='option2'>Option2</option>\n"
        + "    </select>\n"
        + "  </form>\n"
        + "</body></html>";

    final WebDriver driver = loadPage2(html);
    final Actions actions = new Actions(driver);
    actions.moveToElement(driver.findElement(By.id("option1")));
    actions.perform();

    assertTitle(driver, getExpectedAlerts()[0]);
}
 
源代码17 项目: htmlunit   文件: HTMLButtonElementTest.java
/**
 * @throws Exception if an error occurs
 */
@Test
@Alerts("mouse over [btn]")
public void mouseOver() throws Exception {
    final String html =
        HtmlPageTest.STANDARDS_MODE_PREFIX_
        + "<html>\n"
        + "  <head>\n"
        + "    <title>Test</title>\n"
        + "    <script>\n"
        + "    function dumpEvent(event) {\n"
        + "      // target\n"
        + "      var eTarget;\n"
        + "      if (event.target) {\n"
        + "        eTarget = event.target;\n"
        + "      } else if (event.srcElement) {\n"
        + "        eTarget = event.srcElement;\n"
        + "      }\n"
        + "      // defeat Safari bug\n"
        + "      if (eTarget.nodeType == 3) {\n"
        + "        eTarget = eTarget.parentNode;\n"
        + "      }\n"
        + "      var msg = 'mouse over';\n"
        + "      if (eTarget.name) {\n"
        + "        msg = msg + ' [' + eTarget.name + ']';\n"
        + "      } else {\n"
        + "        msg = msg + ' [' + eTarget.id + ']';\n"
        + "      }\n"
        + "      alert(msg);\n"
        + "    }\n"
        + "    </script>\n"
        + "  </head>\n"
        + "<body>\n"
        + "  <form id='form1'>\n"
        + "    <button id='btn' onmouseover='dumpEvent(event);'>button</button><br>\n"
        + "  </form>\n"
        + "</body></html>";

    final WebDriver driver = loadPage2(html);

    final Actions actions = new Actions(driver);
    actions.moveToElement(driver.findElement(By.id("btn")));
    actions.perform();

    verifyAlerts(driver, getExpectedAlerts());
}
 
源代码18 项目: htmlunit   文件: HTMLButtonElementTest.java
/**
 * @throws Exception if an error occurs
 */
@Test
@Alerts(DEFAULT = "Test:",
        FF = "Test:mouse over [disabledBtn]",
        FF68 = "Test:mouse over [disabledBtn]",
        FF60 = "Test:mouse over [disabledBtn]")
public void mouseOverDiabled() throws Exception {
    final String html =
        HtmlPageTest.STANDARDS_MODE_PREFIX_
        + "<html>\n"
        + "  <head>\n"
        + "    <title>Test:</title>\n"
        + "    <script>\n"
        + "    function dumpEvent(event) {\n"
        + "      // target\n"
        + "      var eTarget;\n"
        + "      if (event.target) {\n"
        + "        eTarget = event.target;\n"
        + "      } else if (event.srcElement) {\n"
        + "        eTarget = event.srcElement;\n"
        + "      }\n"
        + "      // defeat Safari bug\n"
        + "      if (eTarget.nodeType == 3) {\n"
        + "        eTarget = eTarget.parentNode;\n"
        + "      }\n"
        + "      var msg = 'mouse over';\n"
        + "      if (eTarget.name) {\n"
        + "        msg = msg + ' [' + eTarget.name + ']';\n"
        + "      } else {\n"
        + "        msg = msg + ' [' + eTarget.id + ']';\n"
        + "      }\n"
        + "      document.title += msg;\n"
        + "    }\n"
        + "    </script>\n"
        + "  </head>\n"
        + "<body>\n"
        + "  <form id='form1'>\n"
        + "    <button id='disabledBtn' onmouseover='dumpEvent(event);' disabled>disabled button</button><br>\n"
        + "  </form>\n"
        + "</body></html>";

    final WebDriver driver = loadPage2(html);

    final Actions actions = new Actions(driver);
    actions.moveToElement(driver.findElement(By.id("disabledBtn")));
    actions.perform();

    assertTitle(driver, getExpectedAlerts()[0]);
}
 
源代码19 项目: rice   文件: WebDriverAftBase.java
/**
 * {@link org.openqa.selenium.interactions.Actions#moveToElement(org.openqa.selenium.WebElement)}
 * @param by
 */
public void fireMouseOverEvent(By by) {
    Actions builder = new Actions(driver);
    Actions hover = builder.moveToElement(findElement(by));
    hover.perform();
}
 
源代码20 项目: archiva   文件: RepositoryAdminTest.java
@Test
public void testManagedRepository()
{
    // login( getAdminUsername(), getAdminPassword() );
    WebDriverWait wait = new WebDriverWait(getWebDriver(), 20);
    WebElement el;
    el = wait.until(ExpectedConditions.elementToBeClickable(By.id("menu-repositories-list-a")));
    tryClick( el,  ExpectedConditions.presenceOfElementLocated( By.id( "managed-repositories-view-a" ) ),
        "Managed Repositories not activated");
    el = wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//a[@href='#remote-repositories-content']")));
    tryClick(el,ExpectedConditions.visibilityOfElementLocated(By.xpath("//table[@id='remote-repositories-table']//td[contains(text(),'central')]")),
        "Remote Repositories View not available");
    el = wait.until(ExpectedConditions.elementToBeClickable( By.xpath("//a[@href='#remote-repository-edit']") ));
    el = tryClick(el, ExpectedConditions.visibilityOfElementLocated(By.id("remote-repository-save-button")),
        "Repository Save Button not available");
    
    setFieldValue( "id", "myrepoid" );        
    setFieldValue( "name", "My repo name" );        
    setFieldValue( "url", "http://www.repo.org" );

    el = wait.until( ExpectedConditions.elementToBeClickable(By.id("remote-repository-save-button") ));
    Actions actions = new Actions(getWebDriver());
    actions.moveToElement(el);
    actions.perform();
    ((JavascriptExecutor)getWebDriver()).executeScript("arguments[0].scrollIntoView();", el);
    el.click();
    el = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("remote-repositories-view-a")));
    ((JavascriptExecutor)getWebDriver()).executeScript("arguments[0].scrollIntoView();", el);
    tryClick(By.id("menu-proxy-connectors-list-a"),
        ExpectedConditions.visibilityOfElementLocated(By.id("proxy-connectors-view-tabs-a-network-proxies-grid")),
        "Network proxies not available",
        3,10
        );
    wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id("main-content"), "Proxy Connectors"));
    // proxy connect
    wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id("proxy-connectors-view"), "central" ));
    assertTextNotPresent( "myrepoid" );
    el = wait.until(ExpectedConditions.elementToBeClickable( By.id("proxy-connectors-view-tabs-a-edit") ));
    el.click();
    el = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("proxy-connector-btn-save")));
    wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("remote-repository-edit-fieldset")));
    // Another hack, don't know why the normal selectValue() does not work here
    ((JavascriptExecutor)getWebDriver()).executeScript("jQuery('#sourceRepoId').css('display','block')");
    Select select = new Select(getWebDriver().findElement(By.xpath(".//select[@id='sourceRepoId']")));
    select.selectByVisibleText("internal");
    // selectValue( "sourceRepoId", "internal", true );
    // Workaround
    // TODO: Check after upgrade of htmlunit, bootstrap or jquery
    // TODO: Check whats wrong here
    ( (JavascriptExecutor) getWebDriver() ).executeScript( "$('#targetRepoId').show();" );
    // End of Workaround
    wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("targetRepoId")));
    selectValue( "targetRepoId", "myrepoid" );
    el.click();
    wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id("user-messages"),"ProxyConnector added"));
    wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id("proxy-connectors-view"), "central" ));
    wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id("proxy-connectors-view"), "myrepoid" ));

    tryClick(By.xpath("//i[contains(@class,'icon-resize-vertical')]//ancestor::a" ),
        ExpectedConditions.visibilityOfAllElementsLocatedBy(By.id("proxy-connector-edit-order-div")),
        "Edit order view not visible", 3, 10);
    // clickLinkWithXPath( "//i[contains(@class,'icon-resize-vertical')]//ancestor::a");
    // This is needed here for HTMLUnit Tests. Currently do not know why, wait is not working for the
    // list entries down
    // waitPage();
    // el = wait.until(ExpectedConditions.presenceOfElementLocated(By.id("proxy-connector-edit-order-div")));
    assertTextPresent( "internal" );
    List<WebElement> repos = wait.until(ExpectedConditions.numberOfElementsToBe( By.xpath("//div[@id='proxy-connector-edit-order-div']/div"), 2));
    Assert.assertTrue("First repo is myrepo", repos.get(0).getText().contains("myrepoid"));
    Assert.assertTrue("Second repo is central", repos.get(1).getText().contains("central"));

    // works until this point
    /*getSelenium().mouseDown( "xpath=//div[@id='proxy-connector-edit-order-div']/div[1]" );
    getSelenium().mouseMove( "xpath=//div[@id='proxy-connector-edit-order-div']/div[2]" );
    getSelenium().mouseUp( "xpath=//div[@id='proxy-connector-edit-order-div']/div[last()]" );
    Assert.assertTrue( "Second repo is myrepo", getSelenium().getText("xpath=//div[@id='proxy-connector-edit-order-div']/div[2]" ).contains( "myrepoid" ));
    Assert.assertTrue( "First repo is central", getSelenium().getText("xpath=//div[@id='proxy-connector-edit-order-div']/div[1]" ).contains( "central" ));
    */
}