<i id='KGjaD'><tr id='KGjaD'><dt id='KGjaD'><q id='KGjaD'><span id='KGjaD'><b id='KGjaD'><form id='KGjaD'><ins id='KGjaD'></ins><ul id='KGjaD'></ul><sub id='KGjaD'></sub></form><legend id='KGjaD'></legend><bdo id='KGjaD'><pre id='KGjaD'><center id='KGjaD'></center></pre></bdo></b><th id='KGjaD'></th></span></q></dt></tr></i><div id='KGjaD'><tfoot id='KGjaD'></tfoot><dl id='KGjaD'><fieldset id='KGjaD'></fieldset></dl></div>

      <tfoot id='KGjaD'></tfoot>
      1. <small id='KGjaD'></small><noframes id='KGjaD'>

        <legend id='KGjaD'><style id='KGjaD'><dir id='KGjaD'><q id='KGjaD'></q></dir></style></legend>
          <bdo id='KGjaD'></bdo><ul id='KGjaD'></ul>
      2. 如何通过 selenium-webdriver 和 Java 使用 java 鼠标悬停

        How to mouse hover using java through selenium-webdriver and Java(如何通过 selenium-webdriver 和 Java 使用 java 鼠标悬停)

          <legend id='6x8Gb'><style id='6x8Gb'><dir id='6x8Gb'><q id='6x8Gb'></q></dir></style></legend>

            <tbody id='6x8Gb'></tbody>
          <tfoot id='6x8Gb'></tfoot>
          <i id='6x8Gb'><tr id='6x8Gb'><dt id='6x8Gb'><q id='6x8Gb'><span id='6x8Gb'><b id='6x8Gb'><form id='6x8Gb'><ins id='6x8Gb'></ins><ul id='6x8Gb'></ul><sub id='6x8Gb'></sub></form><legend id='6x8Gb'></legend><bdo id='6x8Gb'><pre id='6x8Gb'><center id='6x8Gb'></center></pre></bdo></b><th id='6x8Gb'></th></span></q></dt></tr></i><div id='6x8Gb'><tfoot id='6x8Gb'></tfoot><dl id='6x8Gb'><fieldset id='6x8Gb'></fieldset></dl></div>
            <bdo id='6x8Gb'></bdo><ul id='6x8Gb'></ul>

                <small id='6x8Gb'></small><noframes id='6x8Gb'>

                1. 本文介绍了如何通过 selenium-webdriver 和 Java 使用 java 鼠标悬停的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在尝试自动化门户 http://demo.nopcommerce.com/ 时,我无法选择鼠标悬停在电子"菜单上,然后选择相机和照片"子菜单.使用下面的脚本.

                  While trying to automate the portal http://demo.nopcommerce.com/, am not able to select mouse hover over "Electornics" menu and select "Camera & Photo" sub menu. Used the below script for the same.

                  WebElement electronic_Pdts = driver.findElement(By.xpath("//*[@class='title']//*[@title='Show products in category Electronics']"));
                  action.moveToElement(electronic_Pdts).build().perform();
                  driver.findElement(By.xpath("//*[@src='http://demo.nopcommerce.com/images/thumbs/0000006_camera-photo_450.jpeg']")).click();
                  

                  推荐答案

                  鼠标悬停"Electornics"strong> 菜单并选择 "Camera & Photo" 您可以使用以下代码块:

                  To Mouse Hover over "Electornics" menu and select "Camera & Photo" you can use the following code block :

                  driver.get("http://demo.nopcommerce.com/");
                  Actions act = new Actions(driver);
                  WebDriverWait wait = new WebDriverWait(driver, 10);
                  WebElement electronics = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//li/a[@href='/electronics']")));
                  act.moveToElement(electronics).perform();
                  WebElement camera_n_photo = driver.findElement(By.xpath("//li/a[@href='/electronics']//following::ul/li/a"));
                  camera_n_photo.click();
                  System.out.println("Camera & photo Clicked.");
                  

                  这篇关于如何通过 selenium-webdriver 和 Java 使用 java 鼠标悬停的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
                  How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
                  Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                  Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
                  How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
                  How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)
                  <tfoot id='F1A5k'></tfoot><legend id='F1A5k'><style id='F1A5k'><dir id='F1A5k'><q id='F1A5k'></q></dir></style></legend>

                        <tbody id='F1A5k'></tbody>

                      • <small id='F1A5k'></small><noframes id='F1A5k'>

                            <bdo id='F1A5k'></bdo><ul id='F1A5k'></ul>
                            <i id='F1A5k'><tr id='F1A5k'><dt id='F1A5k'><q id='F1A5k'><span id='F1A5k'><b id='F1A5k'><form id='F1A5k'><ins id='F1A5k'></ins><ul id='F1A5k'></ul><sub id='F1A5k'></sub></form><legend id='F1A5k'></legend><bdo id='F1A5k'><pre id='F1A5k'><center id='F1A5k'></center></pre></bdo></b><th id='F1A5k'></th></span></q></dt></tr></i><div id='F1A5k'><tfoot id='F1A5k'></tfoot><dl id='F1A5k'><fieldset id='F1A5k'></fieldset></dl></div>