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

      1. <legend id='EnNaC'><style id='EnNaC'><dir id='EnNaC'><q id='EnNaC'></q></dir></style></legend><tfoot id='EnNaC'></tfoot>

        <small id='EnNaC'></small><noframes id='EnNaC'>

        如何从 Selenium 的 gmail 收件箱中单击特定的电子邮件?

        How to click on a Particular email from gmail inbox in Selenium?(如何从 Selenium 的 gmail 收件箱中单击特定的电子邮件?)

          <tbody id='lhGD1'></tbody>

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

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

              • <tfoot id='lhGD1'></tfoot>
                  <bdo id='lhGD1'></bdo><ul id='lhGD1'></ul>
                  <legend id='lhGD1'><style id='lhGD1'><dir id='lhGD1'><q id='lhGD1'></q></dir></style></legend>

                  本文介绍了如何从 Selenium 的 gmail 收件箱中单击特定的电子邮件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想点击特定的电子邮件,在这种情况下我应该怎么做?我看到有一个具有多个索引的 Webtable,我选择 1 &点击它.有没有人有代码如何处理 WebDriver 中的 webTables?在下面的屏幕中查看确切的情况 -http://screencast.com/t/XRbXQVygNkN6

                  I hv to click on a particular email, in that case what should I do? I seen there is a Webtable with multiple indexes, I hv to select 1 & click on it. does anyone have code how to handle webTables in WebDriver? See exact situation in below screen- http://screencast.com/t/XRbXQVygNkN6

                  我正在尝试使用以下代码 - 请建议我完成其余操作.

                  I was trying with below code -Plz suggest me for rest of the action.

                  gmail登录后-

                  第一次点击收件箱链接--->>然后是促销--->>然后我点击特定的电子邮件

                  1st Ihv clicked on inbox link--->>then Promotions--->>then I hv to click on particular email

                  WebElement PromotionsSection =driver.findElement(By.xpath("//div[contains(@id,':2y')]"));
                  PromotionsSection.click();
                  
                  WebElement email=driver.findElement(By.xpath(".//*[@id=':1g4']/b"));
                  email.click();
                  

                  推荐答案

                  认为你登录后在页面中.现在使用下面的代码:

                  think that u r in page after login. Now use the below code:

                  List<WebElement> email = driver.findElements(By.cssSelector("div.xT>div.y6>span>b"));
                  
                  for(WebElement emailsub : email){
                      if(emailsub.getText().equals("Your Subject Here") == true){
                  
                             emailsub.click();
                             break;
                          }
                      }
                  

                  如果它与主题字符串匹配,这只会点击你的邮件.

                  this will just click on ur mail if it matches the subject string.

                  这篇关于如何从 Selenium 的 gmail 收件箱中单击特定的电子邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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 中的默认语言环境设置以使其保持一致?)

                    <bdo id='zWLzt'></bdo><ul id='zWLzt'></ul>
                  • <legend id='zWLzt'><style id='zWLzt'><dir id='zWLzt'><q id='zWLzt'></q></dir></style></legend>
                      <tbody id='zWLzt'></tbody>

                    <small id='zWLzt'></small><noframes id='zWLzt'>

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

                        1. <tfoot id='zWLzt'></tfoot>