java封装selenium2常用方法

java封装selenium2常用方法


[java]  view plain  copy
  1. package com.selenium.pack;  
  2.   
  3. import java.net.MalformedURLException;  
  4. import java.net.URL;  
  5. import java.util.concurrent.TimeUnit;  
  6.   
  7. import org.openqa.selenium.By;  
  8. import org.openqa.selenium.JavascriptExecutor;  
  9. import org.openqa.selenium.WebDriver;  
  10. import org.openqa.selenium.ie.InternetExplorerDriver;  
  11. import org.openqa.selenium.remote.DesiredCapabilities;  
  12. import org.openqa.selenium.remote.RemoteWebDriver;  
  13.   
  14. public class MyWebdriver {  
  15.     private WebDriver driver;  
  16.     private String value = "";  
  17.     private boolean flag = true;  
  18.   
  19.     public void setWebDriver(WebDriver driver) {  
  20.         this.driver = driver;  
  21.     }  
  22.   
  23.     public WebDriver getWebDriver() {  
  24.         return this.driver;  
  25.     }  
  26.   
  27.     /** 
  28.      * 执行js方法 
  29.      *  
  30.      * @param js 
  31.      */  
  32.     public boolean excuteJS(String js) {  
  33.         if (flag) {  
  34.             try {  
  35.                 ((JavascriptExecutor) driver).executeScript(js);  
  36.                 return true;  
  37.             } catch (Exception e) {  
  38.                 System.out.println(e.getMessage());  
  39.                 return false;  
  40.             }  
  41.         } else {  
  42.             System.out.println("flag is false, function is not excuted");  
  43.             return false;  
  44.         }  
  45.     }  
  46.   
  47.     /** 
  48.      * 根据id定位元素并输入内容 
  49.      *  
  50.      * @param id 
  51.      * @param value 
  52.      */  
  53.     public boolean inputById(String id, String value) {  
  54.         if (flag) {  
  55.             try {  
  56.                 driver.findElement(By.id(id)).sendKeys(value);  
  57.                 return true;  
  58.             } catch (Exception e) {  
  59.                 System.out.println(e.getMessage());  
  60.                 return false;  
  61.             }  
  62.         } else {  
  63.             System.out.println("flag is false, function is not excuted");  
  64.             return false;  
  65.         }  
  66.     }  
  67.   
  68.     /** 
  69.      * 根据xpath定位元素并输入内容 
  70.      *  
  71.      * @param xpath 
  72.      * @param value 
  73.      */  
  74.     public boolean inputByXpath(String xpath, String value) {  
  75.         if (flag) {  
  76.             try {  
  77.                 driver.findElement(By.xpath(xpath)).sendKeys(value);  
  78.                 return true;  
  79.             } catch (Exception e) {  
  80.                 System.out.println(e.getMessage());  
  81.                 return false;  
  82.             }  
  83.         } else {  
  84.             System.out.println("flag is false, function is not excuted");  
  85.             return false;  
  86.         }  
  87.     }  
  88.   
  89.     /** 
  90.      * 根据css定位元素并输入内容 
  91.      *  
  92.      * @param css 
  93.      * @param value 
  94.      */  
  95.     public boolean inputByCss(String css, String value) {  
  96.         if (flag) {  
  97.             try {  
  98.                 driver.findElement(By.cssSelector(css)).sendKeys(value);  
  99.                 return true;  
  100.             } catch (Exception e) {  
  101.                 System.out.println(e.getMessage());  
  102.                 return false;  
  103.             }  
  104.         } else {  
  105.             System.out.println("flag is false, function is not excuted");  
  106.             return false;  
  107.         }  
  108.     }  
  109.   
  110.     public boolean clickBindCard(String cardNo) {  
  111.         flag = false;  
  112.         String value = "";  
  113.         int i = 0;  
  114.         if (!driver.findElement(By.id("r_x")).isDisplayed()) {  
  115.             for (i = 0; i < 5; i++) {  
  116.                 value = driver.findElement(By.id("t_b_" + i)).getText();  
  117.                 if (value.contains(cardNo)) {  
  118.                     flag = true;  
  119.                     System.out.println("t_b_" + i);  
  120.                     driver.findElement(By.id("sel_img_" + i)).click();  
  121.                 }  
  122.             }  
  123.         } else {  
  124.             while (driver.findElement(By.id("r_x")).isDisplayed()) {  
  125.                 System.out.println("i>>" + i);  
  126.                 if (i > 0 && i % 5 == 0) {  
  127.                     driver.findElement(By.id("r_x")).click();  
  128.                 }  
  129.                 value = driver.findElement(By.id("t_b_" + i)).getText();  
  130.                 System.out.println(value + ">>" + value.contains(cardNo));  
  131.                 if (value.contains(cardNo)) {  
  132.                     flag = true;  
  133.                     System.out.println("t_b_" + i);  
  134.                     driver.findElement(By.id("sel_img_" + i)).click();  
  135.                     break;  
  136.                 }  
  137.                 i++;  
  138.             }  
  139.         }  
  140.         return flag;  
  141.     }  
  142.   
  143.     /** 
  144.      * 根据id定位元素并点击 
  145.      *  
  146.      * @param id 
  147.      */  
  148.     public boolean clickById(String id) {  
  149.         if (flag) {  
  150.             try {  
  151.                 if (id.startsWith("sel_img_") && !id.contains("sel_img_ct")) {  
  152.                     int i = Integer.parseInt(id.substring(8, id.length()));  
  153.                     int j = 4;  
  154.                     while (i > 3) {  
  155.                         driver.findElement(By.id("sel_img_" + j)).click();  
  156.                         i -= 4;  
  157.                         j += 4;  
  158.                     }  
  159.                 }  
  160.                 driver.findElement(By.id(id)).click();  
  161.                 System.out.println("click element by id>>" + id);  
  162.                 return true;  
  163.             } catch (Exception e) {  
  164.                 System.out.println(e.getMessage());  
  165.                 return false;  
  166.             }  
  167.         } else {  
  168.             System.out.println("flag is false, function is not excuted");  
  169.             return false;  
  170.         }  
  171.     }  
  172.   
  173.     /** 
  174.      * 根据xpath定位元素并点击 
  175.      *  
  176.      * @param xpath 
  177.      */  
  178.     public boolean clickByXpath(String xpath) {  
  179.         if (flag) {  
  180.             try {  
  181.                 driver.findElement(By.xpath(xpath)).click();  
  182.                 return true;  
  183.             } catch (Exception e) {  
  184.                 System.out.println(e.getMessage());  
  185.                 return false;  
  186.             }  
  187.         } else {  
  188.             System.out.println("flag is false, function is not excuted");  
  189.             return false;  
  190.         }  
  191.     }  
  192.   
  193.     /** 
  194.      * 根据css定位元素并点击 
  195.      *  
  196.      * @param css 
  197.      */  
  198.     public boolean clickByCss(String css) {  
  199.         if (flag) {  
  200.             try {  
  201.                 driver.findElement(By.cssSelector(css)).click();  
  202.                 return true;  
  203.             } catch (Exception e) {  
  204.                 System.out.println(e.getMessage());  
  205.                 return false;  
  206.             }  
  207.         } else {  
  208.             System.out.println("flag is false, function is not excuted");  
  209.             return false;  
  210.         }  
  211.     }  
  212.   
  213.     /** 
  214.      * 根据id定位元素并连续点击 
  215.      *  
  216.      * @param id 
  217.      */  
  218.     public boolean clickById(String id, int count) {  
  219.         if (flag) {  
  220.             try {  
  221.                 if (id.startsWith("sel_img_") && !id.contains("sel_img_ct")) {  
  222.                     int i = Integer.parseInt(id.substring(8, id.length()));  
  223.                     int j = 4;  
  224.                     while (i > 3) {  
  225.                         driver.findElement(By.id("sel_img_" + j)).click();  
  226.                         i -= 4;  
  227.                         j += 4;  
  228.                     }  
  229.                 }  
  230.                 for (int i = 0; i < count; i++) {  
  231.                     driver.findElement(By.id(id)).click();  
  232.                 }  
  233.                 System.out.println("click element by id>>" + id);  
  234.                 return true;  
  235.             } catch (Exception e) {  
  236.                 System.out.println(e.getMessage());  
  237.                 return false;  
  238.             }  
  239.         } else {  
  240.             System.out.println("flag is false, function is not excuted");  
  241.             return false;  
  242.         }  
  243.     }  
  244.   
  245.     /** 
  246.      * 根据xpath定位元素并连续点击 
  247.      *  
  248.      * @param xpath 
  249.      */  
  250.     public boolean clickByXpath(String xpath, int count) {  
  251.         if (flag) {  
  252.             try {  
  253.                 for (int i = 0; i < count; i++) {  
  254.                     driver.findElement(By.xpath(xpath)).click();  
  255.                 }  
  256.                 return true;  
  257.             } catch (Exception e) {  
  258.                 System.out.println(e.getMessage());  
  259.                 return false;  
  260.             }  
  261.         } else {  
  262.             System.out.println("flag is false, function is not excuted");  
  263.             return false;  
  264.         }  
  265.     }  
  266.   
  267.     /** 
  268.      * 根据css定位元素并连续点击 
  269.      *  
  270.      * @param css 
  271.      */  
  272.     public boolean clickByCss(String css, int count) {  
  273.         if (flag) {  
  274.             try {  
  275.                 for (int i = 0; i < count; i++) {  
  276.                     driver.findElement(By.cssSelector(css)).click();  
  277.                 }  
  278.                 return true;  
  279.             } catch (Exception e) {  
  280.                 System.out.println(e.getMessage());  
  281.                 return false;  
  282.             }  
  283.         } else {  
  284.             System.out.println("flag is false, function is not excuted");  
  285.             return false;  
  286.         }  
  287.     }  
  288.   
  289.     /** 
  290.      * 根据xpath定位元素获取值 
  291.      *  
  292.      * @param xpath 
  293.      * @return 
  294.      */  
  295.     public String getValueByXpath(String xpath) {  
  296.         if (flag) {  
  297.             value = driver.findElement(By.xpath(xpath)).getText();  
  298.             System.out.println();  
  299.             return value;  
  300.         } else {  
  301.             System.out.println("flag is false, function is not excuted");  
  302.             return null;  
  303.         }  
  304.     }  
  305.   
  306.     /** 
  307.      * 根据id定位元素获取值 
  308.      *  
  309.      * @param id 
  310.      * @return 
  311.      */  
  312.     public String getValueById(String id) {  
  313.         if (flag) {  
  314.             value = driver.findElement(By.id(id)).getText();  
  315.             System.out.println(value);  
  316.             return value;  
  317.         } else {  
  318.             System.out.println("flag is false, function is not excuted");  
  319.             return null;  
  320.         }  
  321.     }  
  322.   
  323.     /** 
  324.      * 根据css定位元素获取值 
  325.      *  
  326.      * @param css 
  327.      * @return 
  328.      */  
  329.     public String getValueByCss(String css) {  
  330.         if (flag) {  
  331.             value = driver.findElement(By.cssSelector(css)).getText();  
  332.             System.out.println(value);  
  333.             return value;  
  334.         } else {  
  335.             System.out.println("flag is false, function is not excuted");  
  336.             return null;  
  337.         }  
  338.     }  
  339.   
  340.     /** 
  341.      * 根据id定位元素并清空值 
  342.      *  
  343.      * @param id 
  344.      */  
  345.     public boolean clearInputValueById(String id) {  
  346.         if (flag) {  
  347.             try {  
  348.                 driver.findElement(By.id(id)).clear();  
  349.                 return true;  
  350.             } catch (Exception e) {  
  351.                 System.out.println(e.getMessage());  
  352.                 return false;  
  353.             }  
  354.         } else {  
  355.             System.out.println("flag is false, function is not excuted");  
  356.             return false;  
  357.         }  
  358.     }  
  359.   
  360.     /** 
  361.      * 根据xpath定位元素并清空值 
  362.      *  
  363.      * @param xpath 
  364.      */  
  365.     public boolean clearInputValueByXpath(String xpath) {  
  366.         if (flag) {  
  367.             try {  
  368.                 driver.findElement(By.xpath(xpath)).clear();  
  369.                 return true;  
  370.             } catch (Exception e) {  
  371.                 System.out.println(e.getMessage());  
  372.                 return false;  
  373.             }  
  374.         } else {  
  375.             System.out.println("flag is false, function is not excuted");  
  376.             return false;  
  377.         }  
  378.     }  
  379.   
  380.     /** 
  381.      * 根据css定位元素并清空值 
  382.      *  
  383.      * @param css 
  384.      */  
  385.     public boolean clearInputValueByCss(String css) {  
  386.         if (flag) {  
  387.             try {  
  388.                 driver.findElement(By.cssSelector(css)).clear();  
  389.                 return true;  
  390.             } catch (Exception e) {  
  391.                 System.out.println(e.getMessage());  
  392.                 return false;  
  393.             }  
  394.         } else {  
  395.             System.out.println("flag is false, function is not excuted");  
  396.             return false;  
  397.         }  
  398.     }  
  399.   
  400.     /** 
  401.      * 获取网页的title值 
  402.      *  
  403.      * @return 
  404.      */  
  405.     public String getTitle() {  
  406.         if (flag) {  
  407.             return driver.getTitle();  
  408.         } else {  
  409.             System.out.println("flag is false, function is not excuted");  
  410.             return null;  
  411.         }  
  412.     }  
  413.   
  414.     /** 
  415.      * 切换到frame框 
  416.      *  
  417.      * @param frameName 
  418.      */  
  419.     public boolean switchToFrame(String frameName) {  
  420.         if (flag) {  
  421.             try {  
  422.                 driver.switchTo().frame(frameName);  
  423.                 return true;  
  424.             } catch (Exception e) {  
  425.                 e.printStackTrace();  
  426.                 System.out.println(e.getMessage());  
  427.                 return false;  
  428.             }  
  429.         } else {  
  430.             System.out.println("flag is false, function is not excuted");  
  431.             return false;  
  432.         }  
  433.     }  
  434.   
  435.     /** 
  436.      * 根据id定位元素并获取元素的显示状态 
  437.      *  
  438.      * @param id 
  439.      * @return boolean 
  440.      */  
  441.     public boolean getDisplayStatById(String id) {  
  442.         if (flag) {  
  443.             return driver.findElement(By.id(id)).isDisplayed();  
  444.         } else {  
  445.             System.out.println("flag is false, function is not excuted");  
  446.             return false;  
  447.         }  
  448.     }  
  449.   
  450.     /** 
  451.      * 根据xpath定位元素并获取元素的显示状态 
  452.      *  
  453.      * @param xpath 
  454.      * @return 
  455.      */  
  456.     public boolean getDisplayStatByXpath(String xpath) {  
  457.         if (flag) {  
  458.             return driver.findElement(By.xpath(xpath)).isDisplayed();  
  459.         } else {  
  460.             System.out.println("flag is false, function is not excuted");  
  461.             return false;  
  462.         }  
  463.     }  
  464.   
  465.     /** 
  466.      * 根据css定位元素并获取元素的显示状态 
  467.      *  
  468.      * @param css 
  469.      * @return 
  470.      */  
  471.     public boolean getDisplayStatByCss(String css) {  
  472.         if (flag) {  
  473.             return driver.findElement(By.cssSelector(css)).isDisplayed();  
  474.         } else {  
  475.             System.out.println("flag is false, function is not excuted");  
  476.             return false;  
  477.         }  
  478.     }  
  479.   
  480.     /** 
  481.      * 根据id定位元素并获取元素的可写状态 
  482.      *  
  483.      * @param id 
  484.      * @return 
  485.      */  
  486.     public boolean getEnableStatById(String id) {  
  487.         if (flag) {  
  488.             return driver.findElement(By.id(id)).isEnabled();  
  489.         } else {  
  490.             System.out.println("flag is false, function is not excuted");  
  491.             return false;  
  492.         }  
  493.     }  
  494.   
  495.     /** 
  496.      * 根据xpath定位元素并获取元素的可写状态 
  497.      *  
  498.      * @param xpath 
  499.      * @return 
  500.      */  
  501.     public boolean getEnableStatByXpath(String xpath) {  
  502.         if (flag) {  
  503.             return driver.findElement(By.xpath(xpath)).isEnabled();  
  504.         } else {  
  505.             System.out.println("flag is false, function is not excuted");  
  506.             return false;  
  507.         }  
  508.     }  
  509.   
  510.     /** 
  511.      * 根据css定位元素并获取元素的可写状态 
  512.      *  
  513.      * @param css 
  514.      * @return 
  515.      */  
  516.     public boolean getEnableStatByCss(String css) {  
  517.         if (flag) {  
  518.             return driver.findElement(By.cssSelector(css)).isEnabled();  
  519.         } else {  
  520.             System.out.println("flag is false, function is not excuted");  
  521.             return false;  
  522.         }  
  523.   
  524.     }  
  525.   
  526.     /** 
  527.      * 根据id定位元素并获取元素的选中状态 
  528.      *  
  529.      * @param id 
  530.      * @return 
  531.      */  
  532.     public boolean getSelectStatById(String id) {  
  533.         if (flag) {  
  534.             return driver.findElement(By.id(id)).isSelected();  
  535.         } else {  
  536.             System.out.println("flag is false, function is not excuted");  
  537.             return false;  
  538.         }  
  539.     }  
  540.   
  541.     /** 
  542.      * 根据xpath定位元素并获取元素的选中状态 
  543.      *  
  544.      * @param xpath 
  545.      * @return 
  546.      */  
  547.     public boolean getSelectStatByXpath(String xpath) {  
  548.         if (flag) {  
  549.             return driver.findElement(By.xpath(xpath)).isSelected();  
  550.         } else {  
  551.             System.out.println("flag is false, function is not excuted");  
  552.             return false;  
  553.         }  
  554.     }  
  555.   
  556.     /** 
  557.      * 根据css定位元素并获取元素的选中状态 
  558.      *  
  559.      * @param css 
  560.      * @return 
  561.      */  
  562.     public boolean getSelectStatByCss(String css) {  
  563.         if (flag) {  
  564.             return driver.findElement(By.cssSelector(css)).isSelected();  
  565.         } else {  
  566.             System.out.println("flag is false, function is not excuted");  
  567.             return false;  
  568.         }  
  569.     }  
  570.   
  571.     /** 
  572.      * 获取当前焦点所在页面元素的属性值(name,value,id,src等等) 
  573.      *  
  574.      * @param attribute 
  575.      * @return 
  576.      */  
  577.     public String getFocusAttributeValue(String attribute) {  
  578.         try {  
  579.             Thread.sleep(333);  
  580.         } catch (Exception e) {  
  581.             e.printStackTrace();  
  582.         }  
  583.         value = driver.switchTo().activeElement().getAttribute(attribute);  
  584.         System.out.println("The focus Element's " + attribute  
  585.                 + "attribute value is>>" + value);  
  586.         return value;  
  587.     }  
  588.   
  589.     /** 
  590.      * 打开网页链接 
  591.      *  
  592.      * @param pageUrl 
  593.      */  
  594.     public boolean openPage(String pageUrl) {  
  595.         try {  
  596.             driver.get(pageUrl);  
  597.             return true;  
  598.         } catch (Exception e) {  
  599.             System.out.println(e.getMessage());  
  600.             return false;  
  601.         }  
  602.     }  
  603.   
  604.     /** 
  605.      * 进入测试,打开浏览器,输入网址,打开网页 
  606.      *  
  607.      * @param remoteUrl 
  608.      *            远程服务器地址 
  609.      * @param pageUrl 
  610.      *            测试页面地址 
  611.      */  
  612.     public boolean startTest(String remoteUrl, String pageUrl) {  
  613.         try {  
  614.             try {  
  615.                 driver = new RemoteWebDriver(new URL(remoteUrl),  
  616.                         DesiredCapabilities.firefox());  
  617.             } catch (MalformedURLException e) {  
  618.                 e.printStackTrace();  
  619.             }  
  620.             driver.get(pageUrl);  
  621.             return true;  
  622.         } catch (Exception e) {  
  623.             e.printStackTrace();  
  624.             System.out.println(e.getMessage());  
  625.             return false;  
  626.         }  
  627.     }  
  628.   
  629.     /** 
  630.      * 进入测试,打开浏览器,输入网址,打开网页 
  631.      *  
  632.      * @param explore 
  633.      *            调用的浏览器,需要启动不同的server,如:firefox,需要运行selenium-server-standalone- 
  634.      *            2.33.0.jar。IE,则需运行IEDriverServer.exe 
  635.      *  
  636.      * @param remoteUrl 
  637.      *            远程服务器地址 
  638.      * @param pageUrl 
  639.      *            测试页面地址 
  640.      */  
  641.     public boolean startTest(String explore, String remoteUrl, String pageUrl) {  
  642.         try {  
  643.             try {  
  644.                 if ("f".equals(explore)) {  
  645.                     System.out.println("firefox");  
  646.                     driver = new RemoteWebDriver(new URL(remoteUrl),  
  647.                             DesiredCapabilities.firefox());  
  648.                 } else if ("ie".equals(explore)) {  
  649.                     System.out.println("internet explorer");  
  650.                     DesiredCapabilities cap = DesiredCapabilities  
  651.                             .internetExplorer();  
  652.                     driver = new RemoteWebDriver(new URL(remoteUrl), cap);  
  653.                 } else {  
  654.                     System.out.println("firefox");  
  655.                     driver = new RemoteWebDriver(new URL(remoteUrl),  
  656.                             DesiredCapabilities.firefox());  
  657.                 }  
  658.             } catch (Exception e) {  
  659.                 e.printStackTrace();  
  660.             }  
  661.             driver.get(pageUrl);  
  662.             return true;  
  663.         } catch (Exception e) {  
  664.             System.out.println(e.getMessage());  
  665.             return false;  
  666.         }  
  667.     }  
  668.   
  669.     /** 
  670.      * 设置定位页面元素的超时时间 
  671.      *  
  672.      * @param second 
  673.      * @return 
  674.      */  
  675.     public boolean setTimeOut(int second) {  
  676.         try {  
  677.             driver.manage().timeouts().implicitlyWait(second, TimeUnit.SECONDS);  
  678.             return true;  
  679.         } catch (Exception e) {  
  680.             System.out.println(e.getMessage());  
  681.             return false;  
  682.         }  
  683.     }  
  684.   
  685.     /** 
  686.      * 结束测试,关闭浏览器 
  687.      */  
  688.     public boolean endTest() {  
  689.         try {  
  690.             driver.quit();  
  691.             return true;  
  692.         } catch (Exception e) {  
  693.             System.out.println(e.getMessage());  
  694.             return false;  
  695.         }  
  696.     }  
  697.   
  698.     /** 
  699.      * 休息间隔,单位毫秒 
  700.      *  
  701.      * @param millis 
  702.      * @return 
  703.      */  
  704.     public boolean sleep(Long millis) {  
  705.         try {  
  706.             Thread.sleep(millis);  
  707.             return true;  
  708.         } catch (Exception e) {  
  709.             System.out.println(e.getMessage());  
  710.             return false;  
  711.         }  
  712.     }  
  713.   
  714.     /** 
  715.      * 根据id等待对应的页面元素出现 
  716.      *  
  717.      * @param id 
  718.      * @return 
  719.      */  
  720.     public boolean waitForElementById(String id) {  
  721.         try {  
  722.             driver.findElement(By.id(id));  
  723.             return true;  
  724.         } catch (Exception e) {  
  725.             System.out.println(e.getMessage());  
  726.             return false;  
  727.         }  
  728.     }  
  729.   
  730.     /** 
  731.      * 根据css等待对应的页面元素出现 
  732.      *  
  733.      * @param css 
  734.      * @return 
  735.      */  
  736.     public boolean waitForElementByCss(String css) {  
  737.         try {  
  738.             driver.findElement(By.cssSelector(css));  
  739.             return true;  
  740.         } catch (Exception e) {  
  741.             System.out.println(e.getMessage());  
  742.             return false;  
  743.         }  
  744.     }  
  745.   
  746.     /** 
  747.      * 根据xpath等待对应的页面元素出现 
  748.      *  
  749.      * @param xpath 
  750.      * @return 
  751.      */  
  752.     public boolean waitForElementByXpath(String xpath) {  
  753.         try {  
  754.             driver.findElement(By.xpath(xpath));  
  755.             return true;  
  756.         } catch (Exception e) {  
  757.             System.out.println(e.getMessage());  
  758.             return false;  
  759.         }  
  760.     }  
  761.   
  762. }  
课程介绍你是否在寻找机会进入自动化测试领域? 你是否渴望学习selenium webdriver + Java以及最新的框架和技术进行web自动化测试? 你是否感兴趣学习Selenium如何用在你现有的项目里的? 这门课带你从Selenium搭建环境开始讲起,然后学习selenium,TestNG, logback, maven, jenkins。 我们假设学员没有任何自动化经验,来设计的这套课程。每个课题都从最基础的开始讲起。Selenium相关的该覆盖的课题都覆盖了。 例子都是来自于真实的web应用项目,帮助你理解不同的组件怎么用上自动化,这将展示给你一个行业层面的框架,增加自信心。 全网没有其他课程像这门课涵盖到如此之深的细节。 您将会学到什么 学完课程以后,你将拥有完整的Selenium Webdriver知识 你将具备从头开始设计Page Object、Page Factory、DATADRIVEN等搭建自动化框架的能力 用100多个实例对Selenium现实场景应用进行深入理解 全面了解TestNG, Maven, Jenkins, HTML报告,多浏览器并行测试 了解数据库测试和使用Selenium进行性能测试 你将彻底了解testNG框架 你从网上随便选择一个网站,都可以实现自动化,用所有可能的测试用例进行自动化测试 将提高你的编码技能,以编写最优化的自动化测试用例代码 你基本可以搞定任何Selenium面试,并能从设计阶段开始领导整个Selenium自动化项目 你应该能够使用应用程序的GUI来验证数据完整性 你将能够创建漂亮的报告来打动客户或领导 更深入地理解自动化指南和代码质量标准 会附带一个练习网站,可以用上所有可用的WebDriver功能,实现自动化 【适合人群】 软件手动测试人员想转为自动化测试的人员 自动化软件测试人员想加强专业技能的 刚毕业学生想从事软件行业 QA 组长或项目经理 【课程优势】 学完课程以后,你将拥有完整的Selenium Webdriver知识 【讲师介绍】 资质介绍: 12年以上软件测试工作经验,其中7年以上自动化测试开发经验 新书“Python3+Selenium3自动化测试项目实战”作者
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值