liumiaomiao há 3 anos atrás
pai
commit
a4bbe1e8a8

+ 1 - 1
.idea/example.iml

@@ -2,7 +2,7 @@
 <module type="PYTHON_MODULE" version="4">
   <component name="NewModuleRootManager">
     <content url="file://$MODULE_DIR$" />
-    <orderEntry type="inheritedJdk" />
+    <orderEntry type="jdk" jdkName="Python 3.7" jdkType="Python SDK" />
     <orderEntry type="sourceFolder" forTests="false" />
   </component>
 </module>

BIN
cases/3大会员登录/__pycache__/大会员使用页面.cpython-37.pyc


+ 0 - 4
cases/3大会员登录/大会员使用页面.py

@@ -1,11 +1,7 @@
 import time
-
 from pageobject.bigmember_index_page import bi
 from hytest import *
-
 from pageobject.index_page import ip
-
-
 class BigMember:
     name='大会员用户登录'
     def setup(self):

BIN
cases/4超级订阅用户登录/__pycache__/__st__.cpython-37.pyc


+ 372 - 0
log/log_20220606_110717.html

@@ -0,0 +1,372 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>测试报告</title>
+    <meta charset="UTF-8">
+    <style>body {    
+    font-family: consolas, Verdana, sans-serif;
+    font-size: .92em;
+    color: #696e71;
+}
+
+.main_section {   
+    width: 90%;
+    margin: 0 auto;
+}
+
+#float_menu{    
+    position:fixed;
+    top:0;
+    right:0;
+    text-align: center;
+}
+
+#float_menu .menu-item {       
+    cursor: pointer;
+    padding: .5em;
+    margin: .5em 0;
+    color: #c08580;
+    background-color: #f8f0ef;
+    font-size: 1.2em;
+}
+
+table.result_stats{
+    border-collapse: collapse;
+    border: 1px solid #f0e0e5;
+    width: 35em;
+    text-align: center;
+    font-size: 1.0em;
+}
+    
+table.result_stats td{
+    border: 1px solid #f0e0e5;
+    padding: .3em;
+}
+
+.h3_button {
+    margin: 1.5em;
+    cursor: pointer;
+    color: #03a9f4;
+}
+
+
+.info
+{
+    white-space:pre-wrap;
+    padding: .6em;
+}
+
+
+.error-info
+{
+    color: #a64747
+}
+
+.suite_dir {
+    margin: 1em .2em;
+    padding: .3em;
+    /* background-color: #dfeff6; */
+    border: 1px solid #bcd8e4;
+}
+.suite_file {
+    margin: 1em .2em;
+    padding: .3em;
+    border: 1px solid #bcd8e4;
+}
+
+
+.case {
+    margin: 1em .2em;
+    /* padding: .3em; */
+    border: 1px solid #e7d4d4;
+}
+
+.case_class_path{
+    margin: 0em 1em; 
+}
+
+
+.folder_header { 
+    padding: .2em .7em;
+    background-color: #fffaf9;
+    cursor: pointer;
+}
+
+
+.setup{
+    margin: .2em;
+    /* padding: .3em; */
+    /* border: 1px solid #e7d4d4; */
+}
+.teardown{
+    margin: .2em;
+    /* padding: .3em;*/
+    /* border: 1px solid #e7d4d4; */
+}
+.test_steps{
+    margin: .2em;
+    padding: .3em;
+    /* border: 1px solid #e7d4d4; */
+}
+
+
+.label {
+    display: inline-block;
+    padding: .1em .5em;
+    font-size: .88em;
+    letter-spacing: 1px;
+    white-space: nowrap;
+    color: #0d6ebc;
+    border-radius: .2em;
+    min-width: 5em;    
+    margin-right: 2em;
+    font-family: consolas;
+}
+
+/* .suite_setup .label{
+    color: #219e26 ;
+}
+.suite_teardown .label{
+    color: #219e26;
+} */
+
+
+/* .case.pass   .casename{
+    color: #329132 ;
+} */
+.case.pass   .caselabel{
+    color: white;
+    background-color: #3b9e3f;
+}
+/* .case.fail   .casename{
+    color: #a64747;
+} */
+.case.fail   .caselabel{
+    color: white;
+    background-color: #a64747;
+}
+/* .case.abort   .casename{
+    color: #953ab7;
+} */
+.case.abort   .caselabel{
+    color: white;
+    background-color: #9c27b0;
+}
+
+
+
+.case_step  {
+    margin: .8em;
+}
+.checkpoint_pass {
+    margin: .8em;
+}
+.checkpoint_fail {
+    margin: .8em;
+}
+
+.case_step  .tag{
+    color: #2196f3;;
+    margin: .3em 1em .3em 0;
+    padding: .1em .3em;
+    font-size: .92em;
+}
+
+.checkpoint_pass .tag{
+    color: #009806;
+    margin:.3em 1em .3em .5em;
+    padding: .1em .3em;
+    font-size: .92em;
+}
+.checkpoint_fail .tag{
+    color: #9c2020;
+    margin:.3em 1em .3em .5em;
+    padding: .1em .3em;
+    font-size: .92em;
+}
+
+.screenshot {
+    border: 1px solid #86c2dd;
+}
+
+.executetime {
+    float: right;
+}</style>
+    <script type="text/javascript">var FOLDER_ALL_CASES = false //是否为精简模式的标记
+var ERROR_INFOS = [];  // 错误信息列表
+var current_error_idx = -1;
+
+// 页面加载后执行的函数
+window.addEventListener("load", function(){
+    // 所有 .folder_header 添加点击事件处理
+    let folderHeaderEles = document.querySelectorAll(".folder_header");
+    folderHeaderEles.forEach(function(ele) {
+        ele.addEventListener("click", function(event) {
+        let fb = event.target.closest('.folder_header').nextElementSibling;
+        fb.style.display = fb.style.display === 'none' ? 'block' : 'none'
+        });
+    });
+
+    // 找到所有的错误信息对象
+    ERROR_INFOS = document.querySelectorAll(".error-info");
+});
+
+
+
+function toggle_folder_all_cases(){
+    let eles = document.querySelectorAll(".folder_body");
+    
+    FOLDER_ALL_CASES = !FOLDER_ALL_CASES;
+    document.getElementById('display_mode').innerHTML = FOLDER_ALL_CASES? "详细" : "精简"
+
+    for (const ele of eles){
+        ele.style.display =  FOLDER_ALL_CASES? "none": "block"
+    }
+    
+}
+
+
+
+function previous_error(){
+    // 查找错误必须是详细模式
+    if (FOLDER_ALL_CASES)
+        toggle_folder_all_cases()
+
+    current_error_idx -= 1; 
+    if (current_error_idx<0)
+        current_error_idx = 0
+
+    
+    let error = ERROR_INFOS[current_error_idx];
+
+    error.scrollIntoView({behavior: "smooth", block: "center", inline: "start"});
+
+    
+}
+
+
+function next_error(){
+    
+    // 查找错误必须是详细模式
+    if (FOLDER_ALL_CASES)
+        toggle_folder_all_cases()
+
+    current_error_idx += 1;
+    if (current_error_idx > ERROR_INFOS.length-1)
+        current_error_idx = ERROR_INFOS.length-1
+
+    let error = ERROR_INFOS[current_error_idx];
+
+    error.scrollIntoView({behavior: "smooth", block: "center", inline: "start"});
+    
+}</script>
+  </head>
+  <body>
+    <div class="main_section">
+      <h1 style="font-family: auto">测试报告 - hytest v0.6.1</h1>
+      <h3>统计结果</h3>
+      <table class="result_stats">
+        <tbody>
+          <tr>
+            <td>开始时间</td>
+            <td>20220606 11:07:17</td>
+          </tr>
+          <tr>
+            <td>结束时间</td>
+            <td>20220606 11:07:21</td>
+          </tr>
+          <tr>
+            <td>耗时</td>
+            <td>4.486 秒</td>
+          </tr>
+          <tr>
+            <td>用例数量</td>
+            <td>0</td>
+          </tr>
+          <tr>
+            <td>通过</td>
+            <td>0</td>
+          </tr>
+          <tr>
+            <td>失败</td>
+            <td style="">0</td>
+          </tr>
+          <tr>
+            <td>异常</td>
+            <td style="">0</td>
+          </tr>
+          <tr>
+            <td>套件初始化失败</td>
+            <td style="color:red">1</td>
+          </tr>
+          <tr>
+            <td>套件清除失败</td>
+            <td style="">0</td>
+          </tr>
+          <tr>
+            <td>用例初始化失败</td>
+            <td style="">0</td>
+          </tr>
+          <tr>
+            <td>用例清除失败</td>
+            <td style="">0</td>
+          </tr>
+        </tbody>
+      </table>
+      <div style="margin-top:2em">
+        <h3 style="display:inline">执行日志</h3>
+      </div>
+      <div class="exec_log">
+        <div class="suite_dir" id="suite_dir cases\">
+          <div>
+            <span class="label">进入目录</span>
+            <span>cases\</span>
+          </div>
+          <div class="suite_setup setup fail" id="suite_setup setup cases\">
+            <div class="folder_header">
+              <span class="label">套件初始化</span>
+              <span>cases\</span>
+              <span class="executetime">2022-06-06 11:07:17</span>
+            </div>
+            <div class="folder_body">
+              <div class="info">打开网站</div>
+              <div class="info error-info">suite setup fail | Message: no such window: target window already closed
+from unknown error: web view not found
+  (Session info: chrome=88.0.4324.190)
+ 
+Traceback:
+  File &quot;cases\__st__.py&quot;, line 10, in suite_setup
+    sk.SkipAds()
+  File &quot;E:\project\jianyu_auto\pageobject\skip_ads_page.py&quot;, line 11, in SkipAds
+    bp.click(self.ad_loc)
+  File &quot;E:\project\jianyu_auto\base\base_apge.py&quot;, line 100, in click
+    self.locator_element(loc).click()
+  File &quot;E:\project\jianyu_auto\base\base_apge.py&quot;, line 55, in locator_element
+    return wd.find_element(*loc)
+  File &quot;c:\users\liumiaomiao\appdata\local\programs\python\python37\lib\site-packages\selenium\webdriver\remote\webdriver.py&quot;, line 978, in find_element
+    'value': value})['value']
+  File &quot;c:\users\liumiaomiao\appdata\local\programs\python\python37\lib\site-packages\selenium\webdriver\remote\webdriver.py&quot;, line 321, in execute
+    self.error_handler.check_response(response)
+  File &quot;c:\users\liumiaomiao\appdata\local\programs\python\python37\lib\site-packages\selenium\webdriver\remote\errorhandler.py&quot;, line 242, in check_response
+    raise exception_class(message, screen, stacktrace)
+selenium.common.exceptions.NoSuchWindowException: Message: no such window: target window already closed
+from unknown error: web view not found
+  (Session info: chrome=88.0.4324.190)
+
+</div>
+            </div>
+          </div>
+        </div>
+      </div>
+      <div id="float_menu">
+        <div class="menu-item" onclick="document.querySelector(&quot;body&quot;).scrollIntoView()">页首</div>
+        <div class="menu-item" onclick="window.open(&quot;http://www.byhy.net/tut/auto/hytest/01&quot;, &quot;_blank&quot;); ">教程</div>
+        <div class="menu-item" id="display_mode" onclick="toggle_folder_all_cases()">精简</div>
+        <div class="error_jumper" display="block">
+          <div class="menu-item" onclick="previous_error()" title="上一个错误">∧</div>
+          <div class="menu-item" onclick="next_error()" title="下一个错误">∨</div>
+        </div>
+      </div>
+    </div>
+  </body>
+</html>

+ 406 - 0
log/log_20220606_111632.html

@@ -0,0 +1,406 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>测试报告</title>
+    <meta charset="UTF-8">
+    <style>body {    
+    font-family: consolas, Verdana, sans-serif;
+    font-size: .92em;
+    color: #696e71;
+}
+
+.main_section {   
+    width: 90%;
+    margin: 0 auto;
+}
+
+#float_menu{    
+    position:fixed;
+    top:0;
+    right:0;
+    text-align: center;
+}
+
+#float_menu .menu-item {       
+    cursor: pointer;
+    padding: .5em;
+    margin: .5em 0;
+    color: #c08580;
+    background-color: #f8f0ef;
+    font-size: 1.2em;
+}
+
+table.result_stats{
+    border-collapse: collapse;
+    border: 1px solid #f0e0e5;
+    width: 35em;
+    text-align: center;
+    font-size: 1.0em;
+}
+    
+table.result_stats td{
+    border: 1px solid #f0e0e5;
+    padding: .3em;
+}
+
+.h3_button {
+    margin: 1.5em;
+    cursor: pointer;
+    color: #03a9f4;
+}
+
+
+.info
+{
+    white-space:pre-wrap;
+    padding: .6em;
+}
+
+
+.error-info
+{
+    color: #a64747
+}
+
+.suite_dir {
+    margin: 1em .2em;
+    padding: .3em;
+    /* background-color: #dfeff6; */
+    border: 1px solid #bcd8e4;
+}
+.suite_file {
+    margin: 1em .2em;
+    padding: .3em;
+    border: 1px solid #bcd8e4;
+}
+
+
+.case {
+    margin: 1em .2em;
+    /* padding: .3em; */
+    border: 1px solid #e7d4d4;
+}
+
+.case_class_path{
+    margin: 0em 1em; 
+}
+
+
+.folder_header { 
+    padding: .2em .7em;
+    background-color: #fffaf9;
+    cursor: pointer;
+}
+
+
+.setup{
+    margin: .2em;
+    /* padding: .3em; */
+    /* border: 1px solid #e7d4d4; */
+}
+.teardown{
+    margin: .2em;
+    /* padding: .3em;*/
+    /* border: 1px solid #e7d4d4; */
+}
+.test_steps{
+    margin: .2em;
+    padding: .3em;
+    /* border: 1px solid #e7d4d4; */
+}
+
+
+.label {
+    display: inline-block;
+    padding: .1em .5em;
+    font-size: .88em;
+    letter-spacing: 1px;
+    white-space: nowrap;
+    color: #0d6ebc;
+    border-radius: .2em;
+    min-width: 5em;    
+    margin-right: 2em;
+    font-family: consolas;
+}
+
+/* .suite_setup .label{
+    color: #219e26 ;
+}
+.suite_teardown .label{
+    color: #219e26;
+} */
+
+
+/* .case.pass   .casename{
+    color: #329132 ;
+} */
+.case.pass   .caselabel{
+    color: white;
+    background-color: #3b9e3f;
+}
+/* .case.fail   .casename{
+    color: #a64747;
+} */
+.case.fail   .caselabel{
+    color: white;
+    background-color: #a64747;
+}
+/* .case.abort   .casename{
+    color: #953ab7;
+} */
+.case.abort   .caselabel{
+    color: white;
+    background-color: #9c27b0;
+}
+
+
+
+.case_step  {
+    margin: .8em;
+}
+.checkpoint_pass {
+    margin: .8em;
+}
+.checkpoint_fail {
+    margin: .8em;
+}
+
+.case_step  .tag{
+    color: #2196f3;;
+    margin: .3em 1em .3em 0;
+    padding: .1em .3em;
+    font-size: .92em;
+}
+
+.checkpoint_pass .tag{
+    color: #009806;
+    margin:.3em 1em .3em .5em;
+    padding: .1em .3em;
+    font-size: .92em;
+}
+.checkpoint_fail .tag{
+    color: #9c2020;
+    margin:.3em 1em .3em .5em;
+    padding: .1em .3em;
+    font-size: .92em;
+}
+
+.screenshot {
+    border: 1px solid #86c2dd;
+}
+
+.executetime {
+    float: right;
+}</style>
+    <script type="text/javascript">var FOLDER_ALL_CASES = false //是否为精简模式的标记
+var ERROR_INFOS = [];  // 错误信息列表
+var current_error_idx = -1;
+
+// 页面加载后执行的函数
+window.addEventListener("load", function(){
+    // 所有 .folder_header 添加点击事件处理
+    let folderHeaderEles = document.querySelectorAll(".folder_header");
+    folderHeaderEles.forEach(function(ele) {
+        ele.addEventListener("click", function(event) {
+        let fb = event.target.closest('.folder_header').nextElementSibling;
+        fb.style.display = fb.style.display === 'none' ? 'block' : 'none'
+        });
+    });
+
+    // 找到所有的错误信息对象
+    ERROR_INFOS = document.querySelectorAll(".error-info");
+});
+
+
+
+function toggle_folder_all_cases(){
+    let eles = document.querySelectorAll(".folder_body");
+    
+    FOLDER_ALL_CASES = !FOLDER_ALL_CASES;
+    document.getElementById('display_mode').innerHTML = FOLDER_ALL_CASES? "详细" : "精简"
+
+    for (const ele of eles){
+        ele.style.display =  FOLDER_ALL_CASES? "none": "block"
+    }
+    
+}
+
+
+
+function previous_error(){
+    // 查找错误必须是详细模式
+    if (FOLDER_ALL_CASES)
+        toggle_folder_all_cases()
+
+    current_error_idx -= 1; 
+    if (current_error_idx<0)
+        current_error_idx = 0
+
+    
+    let error = ERROR_INFOS[current_error_idx];
+
+    error.scrollIntoView({behavior: "smooth", block: "center", inline: "start"});
+
+    
+}
+
+
+function next_error(){
+    
+    // 查找错误必须是详细模式
+    if (FOLDER_ALL_CASES)
+        toggle_folder_all_cases()
+
+    current_error_idx += 1;
+    if (current_error_idx > ERROR_INFOS.length-1)
+        current_error_idx = ERROR_INFOS.length-1
+
+    let error = ERROR_INFOS[current_error_idx];
+
+    error.scrollIntoView({behavior: "smooth", block: "center", inline: "start"});
+    
+}</script>
+  </head>
+  <body>
+    <div class="main_section">
+      <h1 style="font-family: auto">测试报告 - hytest v0.6.1</h1>
+      <h3>统计结果</h3>
+      <table class="result_stats">
+        <tbody>
+          <tr>
+            <td>开始时间</td>
+            <td>20220606 11:16:32</td>
+          </tr>
+          <tr>
+            <td>结束时间</td>
+            <td>20220606 11:17:06</td>
+          </tr>
+          <tr>
+            <td>耗时</td>
+            <td>33.910 秒</td>
+          </tr>
+          <tr>
+            <td>用例数量</td>
+            <td>1</td>
+          </tr>
+          <tr>
+            <td>通过</td>
+            <td>1</td>
+          </tr>
+          <tr>
+            <td>失败</td>
+            <td style="">0</td>
+          </tr>
+          <tr>
+            <td>异常</td>
+            <td style="">0</td>
+          </tr>
+          <tr>
+            <td>套件初始化失败</td>
+            <td style="">0</td>
+          </tr>
+          <tr>
+            <td>套件清除失败</td>
+            <td style="">0</td>
+          </tr>
+          <tr>
+            <td>用例初始化失败</td>
+            <td style="">0</td>
+          </tr>
+          <tr>
+            <td>用例清除失败</td>
+            <td style="">0</td>
+          </tr>
+        </tbody>
+      </table>
+      <div style="margin-top:2em">
+        <h3 style="display:inline">执行日志</h3>
+      </div>
+      <div class="exec_log">
+        <div class="suite_dir" id="suite_dir cases\">
+          <div>
+            <span class="label">进入目录</span>
+            <span>cases\</span>
+          </div>
+          <div class="suite_setup setup" id="suite_setup setup cases\">
+            <div class="folder_header">
+              <span class="label">套件初始化</span>
+              <span>cases\</span>
+              <span class="executetime">2022-06-06 11:16:32</span>
+            </div>
+            <div class="folder_body">
+              <div class="info">打开网站</div>
+            </div>
+          </div>
+        </div>
+        <div class="suite_dir" id="suite_dir cases\1非登录\">
+          <div>
+            <span class="label">进入目录</span>
+            <span>cases\1非登录\</span>
+          </div>
+          <div class="suite_setup setup" id="suite_setup setup cases\1非登录\">
+            <div class="folder_header">
+              <span class="label">套件初始化</span>
+              <span>cases\1非登录\</span>
+              <span class="executetime">2022-06-06 11:16:38</span>
+            </div>
+            <div class="folder_body"></div>
+          </div>
+        </div>
+        <div class="suite_file" id="suite_file cases\1非登录\登录成功.py">
+          <div>
+            <span class="label">进入文件</span>
+            <span>cases\1非登录\登录成功.py</span>
+          </div>
+          <div class="case pass" id="case_00000001">
+            <div class="folder_header">
+              <span class="label caselabel">用例 PASS</span>
+              <span class="casename">用户名密码登陆---login_test01</span>
+              <span class="executetime">2022-06-06 11:16:47</span>
+            </div>
+            <div class="folder_body">
+              <span class="case_class_path">cases\1非登录\登录成功.py::LoginWeb</span>
+              <div class="test_steps" id="test_steps 用户名密码登陆---login_test01">
+                <span class="label">测试步骤</span>
+                <div class="checkpoint_pass">
+                  <span class="tag">检查点 PASS</span>
+                  <span>设置检查点,验证是否登录成功</span>
+                </div>
+              </div>
+              <div class="case_teardown teardown case_st_lable" id="case_teardown teardown 用户名密码登陆---login_test01">
+                <span class="label">用例清除</span>
+              </div>
+            </div>
+          </div>
+          <div class="suite_teardown teardown" id="suite_teardown teardown cases\1非登录\">
+            <div class="folder_header">
+              <span class="label">套件清除</span>
+              <span>cases\1非登录\</span>
+              <span class="executetime">2022-06-06 11:16:57</span>
+            </div>
+            <div class="folder_body"></div>
+          </div>
+          <div class="suite_teardown teardown" id="suite_teardown teardown cases\">
+            <div class="folder_header">
+              <span class="label">套件清除</span>
+              <span>cases\</span>
+              <span class="executetime">2022-06-06 11:17:04</span>
+            </div>
+            <div class="folder_body">
+              <div class="info">suite_teardown</div>
+            </div>
+          </div>
+        </div>
+      </div>
+      <div id="float_menu">
+        <div class="menu-item" onclick="document.querySelector(&quot;body&quot;).scrollIntoView()">页首</div>
+        <div class="menu-item" onclick="window.open(&quot;http://www.byhy.net/tut/auto/hytest/01&quot;, &quot;_blank&quot;); ">教程</div>
+        <div class="menu-item" id="display_mode" onclick="toggle_folder_all_cases()">精简</div>
+        <div class="error_jumper" display="none">
+          <div class="menu-item" onclick="previous_error()" title="上一个错误">∧</div>
+          <div class="menu-item" onclick="next_error()" title="下一个错误">∨</div>
+        </div>
+      </div>
+    </div>
+  </body>
+</html>

+ 12 - 40
log/testresult.log

@@ -1,6 +1,6 @@
 
 
-  ========= 测试开始 : 20220602_112504 =========
+  ========= 测试开始 : 20220606_111632 =========
 
 
 
@@ -10,66 +10,38 @@
 打开网站
 
 
->>> cases\4超级订阅用户登录\
+>>> cases\1非登录\
 
-[ suite setup ] cases\4超级订阅用户登录\
-登录网站
+[ suite setup ] cases\1非登录\
 
 
->>> cases\4超级订阅用户登录\搜索\
+>>> cases\1非登录\登录成功.py
 
-[ suite setup ] cases\4超级订阅用户登录\搜索\
-
-
->>> cases\4超级订阅用户登录\搜索\用户输入时间搜索.py
-
-* 自定义时间搜索---test3022  -  2022-06-02 11:25:40
-
-  [ case execution steps ]
-
-** 检查点 **  验证搜索结果的日期在搜索日期内,搜索日期:2021-02-03--2021-02-04 ---->  通过
-
-  PASS 
-
-[ case teardown ] 自定义时间搜索---test3022
-
-* 自定义时间搜索---test3023  -  2022-06-02 11:26:41
+* 用户名密码登陆---login_test01  -  2022-06-06 11:16:47
 
   [ case execution steps ]
 
-** 检查点 **  验证搜索结果的日期在搜索日期内,搜索日期:大于2021-02-03 ---->  通过
+** 检查点 **  设置检查点,验证是否登录成功 ---->  通过
 
   PASS 
 
-[ case teardown ] 自定义时间搜索---test3023
-
-* 自定义时间搜索---test3024  -  2022-06-02 11:27:41
-
-  [ case execution steps ]
-
-** 检查点 **  验证搜索结果的日期在搜索日期内,搜索日期:小于2021-02-04 ---->  通过
-
-  PASS 
-
-[ case teardown ] 自定义时间搜索---test3024
-
-[ suite teardown ] cases\4超级订阅用户登录\搜索\
+[ case teardown ] 用户名密码登陆---login_test01
 
-[ suite teardown ] cases\4超级订阅用户登录\
+[ suite teardown ] cases\1非登录\
 
 [ suite teardown ] cases\
 suite_teardown
 
 
-  ========= 测试结束 : 20220602_112856 =========
+  ========= 测试结束 : 20220606_111706 =========
 
 
-  耗时    : 231.440 秒
+  耗时    : 33.910 秒
 
 
-  用例数量 : 3
+  用例数量 : 1
 
-  通过 : 3
+  通过 : 1
 
   失败 : 0
 

+ 16 - 52
log/testresult.log.1

@@ -1,6 +1,6 @@
 
 
-  ========= 测试开始 : 20220602_112127 =========
+  ========= 测试开始 : 20220606_110717 =========
 
 
 
@@ -8,72 +8,36 @@
 
 [ suite setup ] cases\
 打开网站
-
-
->>> cases\4超级订阅用户登录\
-
-[ suite setup ] cases\4超级订阅用户登录\
-登录网站
-
-
->>> cases\4超级订阅用户登录\搜索\
-
-[ suite setup ] cases\4超级订阅用户登录\搜索\
-suite setup fail | Message: element click intercepted: Element <input class="btn" type="button" onclick="zbSeatch('zbIndex')"> is not clickable at point (1046, 213). Other element would receive the click: <div class="modal fade bidLogin in" id="bidLogin" tabindex="-1" role="dialog" aria-labelledby="bidLogin" aria-hidden="false" style="display: block; padding-right: 5px;">...</div>
-  (Session info: chrome=88.0.4324.190)
- 
-Traceback:
-  File "cases\4超级订阅用户登录\搜索\__st__.py", line 5, in suite_setup
-    sp.go_to_search()
-  File "E:\project\jianyu_auto\pageobject\search_page.py", line 74, in go_to_search
-    bp.click(self.search_loc)
-  File "E:\project\jianyu_auto\base\base_apge.py", line 100, in click
-    self.locator_element(loc).click()
-  File "c:\users\liumiaomiao\appdata\local\programs\python\python37\lib\site-packages\selenium\webdriver\remote\webelement.py", line 80, in click
-    self._execute(Command.CLICK_ELEMENT)
-  File "c:\users\liumiaomiao\appdata\local\programs\python\python37\lib\site-packages\selenium\webdriver\remote\webelement.py", line 633, in _execute
-    return self._parent.execute(command, params)
-  File "c:\users\liumiaomiao\appdata\local\programs\python\python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
-    self.error_handler.check_response(response)
-  File "c:\users\liumiaomiao\appdata\local\programs\python\python37\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
-    raise exception_class(message, screen, stacktrace)
-selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <input class="btn" type="button" onclick="zbSeatch('zbIndex')"> is not clickable at point (1046, 213). Other element would receive the click: <div class="modal fade bidLogin in" id="bidLogin" tabindex="-1" role="dialog" aria-labelledby="bidLogin" aria-hidden="false" style="display: block; padding-right: 5px;">...</div>
-  (Session info: chrome=88.0.4324.190)
-
-
-
-[ suite teardown ] cases\4超级订阅用户登录\
-suite teardown fail | Message: element click intercepted: Element <a class="logo" href="/" data-cl-id="866346189">...</a> is not clickable at point (233, 31). Other element would receive the click: <div class="modal fade bidLogin in" id="bidLogin" tabindex="-1" role="dialog" aria-labelledby="bidLogin" aria-hidden="false" style="display: block; padding-right: 5px;">...</div>
+suite setup fail | Message: no such window: target window already closed
+from unknown error: web view not found
   (Session info: chrome=88.0.4324.190)
  
 Traceback:
-  File "cases\4超级订阅用户登录\__st__.py", line 14, in suite_teardown
-    ip.go_to_index()
-  File "E:\project\jianyu_auto\pageobject\index_page.py", line 116, in go_to_index
-    bp.click(self.logo_loc)
+  File "cases\__st__.py", line 10, in suite_setup
+    sk.SkipAds()
+  File "E:\project\jianyu_auto\pageobject\skip_ads_page.py", line 11, in SkipAds
+    bp.click(self.ad_loc)
   File "E:\project\jianyu_auto\base\base_apge.py", line 100, in click
     self.locator_element(loc).click()
-  File "c:\users\liumiaomiao\appdata\local\programs\python\python37\lib\site-packages\selenium\webdriver\remote\webelement.py", line 80, in click
-    self._execute(Command.CLICK_ELEMENT)
-  File "c:\users\liumiaomiao\appdata\local\programs\python\python37\lib\site-packages\selenium\webdriver\remote\webelement.py", line 633, in _execute
-    return self._parent.execute(command, params)
+  File "E:\project\jianyu_auto\base\base_apge.py", line 55, in locator_element
+    return wd.find_element(*loc)
+  File "c:\users\liumiaomiao\appdata\local\programs\python\python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 978, in find_element
+    'value': value})['value']
   File "c:\users\liumiaomiao\appdata\local\programs\python\python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
     self.error_handler.check_response(response)
   File "c:\users\liumiaomiao\appdata\local\programs\python\python37\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
     raise exception_class(message, screen, stacktrace)
-selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <a class="logo" href="/" data-cl-id="866346189">...</a> is not clickable at point (233, 31). Other element would receive the click: <div class="modal fade bidLogin in" id="bidLogin" tabindex="-1" role="dialog" aria-labelledby="bidLogin" aria-hidden="false" style="display: block; padding-right: 5px;">...</div>
+selenium.common.exceptions.NoSuchWindowException: Message: no such window: target window already closed
+from unknown error: web view not found
   (Session info: chrome=88.0.4324.190)
 
 
 
-[ suite teardown ] cases\
-suite_teardown
-
 
-  ========= 测试结束 : 20220602_112151 =========
+  ========= 测试结束 : 20220606_110721 =========
 
 
-  耗时    : 24.417
+  耗时    : 4.486 秒
 
 
   用例数量 : 0
@@ -86,7 +50,7 @@ suite_teardown
 
   套件初始化失败 : 1
 
-  套件清除  失败 : 1
+  套件清除  失败 : 0
 
   用例初始化失败 : 0
 

+ 39 - 48
log/testresult.log.2

@@ -1,6 +1,6 @@
 
 
-  ========= 测试开始 : 20220602_112042 =========
+  ========= 测试开始 : 20220602_112504 =========
 
 
 
@@ -19,74 +19,65 @@
 >>> cases\4超级订阅用户登录\搜索\
 
 [ suite setup ] cases\4超级订阅用户登录\搜索\
-suite setup fail | Message: element click intercepted: Element <input class="btn" type="button" onclick="zbSeatch('zbIndex')"> is not clickable at point (1046, 213). Other element would receive the click: <div class="modal fade bidLogin in" id="bidLogin" tabindex="-1" role="dialog" aria-labelledby="bidLogin" aria-hidden="false" style="display: block; padding-right: 5px;">...</div>
-  (Session info: chrome=88.0.4324.190)
- 
-Traceback:
-  File "cases\4超级订阅用户登录\搜索\__st__.py", line 5, in suite_setup
-    sp.go_to_search()
-  File "E:\project\jianyu_auto\pageobject\search_page.py", line 74, in go_to_search
-    bp.click(self.search_loc)
-  File "E:\project\jianyu_auto\base\base_apge.py", line 100, in click
-    self.locator_element(loc).click()
-  File "c:\users\liumiaomiao\appdata\local\programs\python\python37\lib\site-packages\selenium\webdriver\remote\webelement.py", line 80, in click
-    self._execute(Command.CLICK_ELEMENT)
-  File "c:\users\liumiaomiao\appdata\local\programs\python\python37\lib\site-packages\selenium\webdriver\remote\webelement.py", line 633, in _execute
-    return self._parent.execute(command, params)
-  File "c:\users\liumiaomiao\appdata\local\programs\python\python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
-    self.error_handler.check_response(response)
-  File "c:\users\liumiaomiao\appdata\local\programs\python\python37\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
-    raise exception_class(message, screen, stacktrace)
-selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <input class="btn" type="button" onclick="zbSeatch('zbIndex')"> is not clickable at point (1046, 213). Other element would receive the click: <div class="modal fade bidLogin in" id="bidLogin" tabindex="-1" role="dialog" aria-labelledby="bidLogin" aria-hidden="false" style="display: block; padding-right: 5px;">...</div>
-  (Session info: chrome=88.0.4324.190)
 
 
+>>> cases\4超级订阅用户登录\搜索\用户输入时间搜索.py
 
-[ suite teardown ] cases\4超级订阅用户登录\
-suite teardown fail | Message: element click intercepted: Element <a class="logo" href="/" data-cl-id="866346189">...</a> is not clickable at point (233, 31). Other element would receive the click: <div class="modal fade bidLogin in" id="bidLogin" tabindex="-1" role="dialog" aria-labelledby="bidLogin" aria-hidden="false" style="display: block; padding-right: 5px;">...</div>
-  (Session info: chrome=88.0.4324.190)
- 
-Traceback:
-  File "cases\4超级订阅用户登录\__st__.py", line 14, in suite_teardown
-    ip.go_to_index()
-  File "E:\project\jianyu_auto\pageobject\index_page.py", line 116, in go_to_index
-    bp.click(self.logo_loc)
-  File "E:\project\jianyu_auto\base\base_apge.py", line 100, in click
-    self.locator_element(loc).click()
-  File "c:\users\liumiaomiao\appdata\local\programs\python\python37\lib\site-packages\selenium\webdriver\remote\webelement.py", line 80, in click
-    self._execute(Command.CLICK_ELEMENT)
-  File "c:\users\liumiaomiao\appdata\local\programs\python\python37\lib\site-packages\selenium\webdriver\remote\webelement.py", line 633, in _execute
-    return self._parent.execute(command, params)
-  File "c:\users\liumiaomiao\appdata\local\programs\python\python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
-    self.error_handler.check_response(response)
-  File "c:\users\liumiaomiao\appdata\local\programs\python\python37\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
-    raise exception_class(message, screen, stacktrace)
-selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <a class="logo" href="/" data-cl-id="866346189">...</a> is not clickable at point (233, 31). Other element would receive the click: <div class="modal fade bidLogin in" id="bidLogin" tabindex="-1" role="dialog" aria-labelledby="bidLogin" aria-hidden="false" style="display: block; padding-right: 5px;">...</div>
-  (Session info: chrome=88.0.4324.190)
+* 自定义时间搜索---test3022  -  2022-06-02 11:25:40
+
+  [ case execution steps ]
+
+** 检查点 **  验证搜索结果的日期在搜索日期内,搜索日期:2021-02-03--2021-02-04 ---->  通过
+
+  PASS 
+
+[ case teardown ] 自定义时间搜索---test3022
+
+* 自定义时间搜索---test3023  -  2022-06-02 11:26:41
+
+  [ case execution steps ]
+
+** 检查点 **  验证搜索结果的日期在搜索日期内,搜索日期:大于2021-02-03 ---->  通过
 
+  PASS 
 
+[ case teardown ] 自定义时间搜索---test3023
+
+* 自定义时间搜索---test3024  -  2022-06-02 11:27:41
+
+  [ case execution steps ]
+
+** 检查点 **  验证搜索结果的日期在搜索日期内,搜索日期:小于2021-02-04 ---->  通过
+
+  PASS 
+
+[ case teardown ] 自定义时间搜索---test3024
+
+[ suite teardown ] cases\4超级订阅用户登录\搜索\
+
+[ suite teardown ] cases\4超级订阅用户登录\
 
 [ suite teardown ] cases\
 suite_teardown
 
 
-  ========= 测试结束 : 20220602_112107 =========
+  ========= 测试结束 : 20220602_112856 =========
 
 
-  耗时    : 25.095 秒
+  耗时    : 231.440
 
 
-  用例数量 : 0
+  用例数量 : 3
 
-  通过 : 0
+  通过 : 3
 
   失败 : 0
 
   异常 : 0
 
-  套件初始化失败 : 1
+  套件初始化失败 : 0
 
-  套件清除  失败 : 1
+  套件清除  失败 : 0
 
   用例初始化失败 : 0