分配、导入期初帐
This commit is contained in:
parent
f662ae94d5
commit
f0d2c84366
|
@ -4,6 +4,8 @@
|
|||
<w>datepicker</w>
|
||||
<w>disapeared</w>
|
||||
<w>huangcaiyan</w>
|
||||
<w>inviteuser</w>
|
||||
<w>menuitem</w>
|
||||
<w>tbody</w>
|
||||
<w>webelement</w>
|
||||
</words>
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="PyChainedComparisonsInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
||||
<option name="ignoreConstantInTheMiddle" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PyPep8Inspection" enabled="false" level="WEAK WARNING" enabled_by_default="false">
|
||||
<option name="ignoredErrors">
|
||||
<list>
|
||||
|
@ -12,6 +15,7 @@
|
|||
<option name="ignoredErrors">
|
||||
<list>
|
||||
<option value="N806" />
|
||||
<option value="N802" />
|
||||
</list>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
|
|
1083
.idea/workspace.xml
1083
.idea/workspace.xml
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
@ -0,0 +1,317 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>管有账测试报告</title>
|
||||
<meta name="generator" content="HTMLTestRunner 0.8.2"/>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
|
||||
<style type="text/css" media="screen">
|
||||
body { font-family: verdana, arial, helvetica, sans-serif; font-size: 80%; }
|
||||
table { font-size: 100%; }
|
||||
pre { }
|
||||
|
||||
/* -- heading ---------------------------------------------------------------------- */
|
||||
h1 {
|
||||
font-size: 16pt;
|
||||
color: gray;
|
||||
}
|
||||
.heading {
|
||||
margin-top: 0ex;
|
||||
margin-bottom: 1ex;
|
||||
}
|
||||
|
||||
.heading .attribute {
|
||||
margin-top: 1ex;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.heading .description {
|
||||
margin-top: 4ex;
|
||||
margin-bottom: 6ex;
|
||||
}
|
||||
|
||||
/* -- css div popup ------------------------------------------------------------------------ */
|
||||
a.popup_link {
|
||||
}
|
||||
|
||||
a.popup_link:hover {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.popup_window {
|
||||
display: none;
|
||||
position: relative;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
/*border: solid #627173 1px; */
|
||||
padding: 10px;
|
||||
background-color: #E6E6D6;
|
||||
font-family: "Lucida Console", "Courier New", Courier, monospace;
|
||||
text-align: left;
|
||||
font-size: 8pt;
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
}
|
||||
/* -- report ------------------------------------------------------------------------ */
|
||||
#show_detail_line {
|
||||
margin-top: 3ex;
|
||||
margin-bottom: 1ex;
|
||||
}
|
||||
#result_table {
|
||||
width: 80%;
|
||||
border-collapse: collapse;
|
||||
border: 1px solid #777;
|
||||
}
|
||||
#header_row {
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
background-color: #777;
|
||||
}
|
||||
#result_table td {
|
||||
border: 1px solid #777;
|
||||
padding: 2px;
|
||||
}
|
||||
#total_row { font-weight: bold; }
|
||||
.passClass { background-color: #6c6; }
|
||||
.failClass { background-color: #c60; }
|
||||
.errorClass { background-color: #c00; }
|
||||
.passCase { color: #6c6; }
|
||||
.failCase { color: #c60; font-weight: bold; }
|
||||
.errorCase { color: #c00; font-weight: bold; }
|
||||
.hiddenRow { display: none; }
|
||||
.testcase { margin-left: 2em; }
|
||||
|
||||
|
||||
/* -- ending ---------------------------------------------------------------------- */
|
||||
#ending {
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<script language="javascript" type="text/javascript"><!--
|
||||
output_list = Array();
|
||||
|
||||
/* level - 0:Summary; 1:Failed; 2:All */
|
||||
function showCase(level) {
|
||||
trs = document.getElementsByTagName("tr");
|
||||
for (var i = 0; i < trs.length; i++) {
|
||||
tr = trs[i];
|
||||
id = tr.id;
|
||||
if (id.substr(0,2) == 'ft') {
|
||||
if (level < 1) {
|
||||
tr.className = 'hiddenRow';
|
||||
}
|
||||
else {
|
||||
tr.className = '';
|
||||
}
|
||||
}
|
||||
if (id.substr(0,2) == 'pt') {
|
||||
if (level > 1) {
|
||||
tr.className = '';
|
||||
}
|
||||
else {
|
||||
tr.className = 'hiddenRow';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function showClassDetail(cid, count) {
|
||||
var id_list = Array(count);
|
||||
var toHide = 1;
|
||||
for (var i = 0; i < count; i++) {
|
||||
tid0 = 't' + cid.substr(1) + '.' + (i+1);
|
||||
tid = 'f' + tid0;
|
||||
tr = document.getElementById(tid);
|
||||
if (!tr) {
|
||||
tid = 'p' + tid0;
|
||||
tr = document.getElementById(tid);
|
||||
}
|
||||
id_list[i] = tid;
|
||||
if (tr.className) {
|
||||
toHide = 0;
|
||||
}
|
||||
}
|
||||
for (var i = 0; i < count; i++) {
|
||||
tid = id_list[i];
|
||||
if (toHide) {
|
||||
document.getElementById('div_'+tid).style.display = 'none'
|
||||
document.getElementById(tid).className = 'hiddenRow';
|
||||
}
|
||||
else {
|
||||
document.getElementById(tid).className = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function showTestDetail(div_id){
|
||||
var details_div = document.getElementById(div_id)
|
||||
var displayState = details_div.style.display
|
||||
// alert(displayState)
|
||||
if (displayState != 'block' ) {
|
||||
displayState = 'block'
|
||||
details_div.style.display = 'block'
|
||||
}
|
||||
else {
|
||||
details_div.style.display = 'none'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function html_escape(s) {
|
||||
s = s.replace(/&/g,'&');
|
||||
s = s.replace(/</g,'<');
|
||||
s = s.replace(/>/g,'>');
|
||||
return s;
|
||||
}
|
||||
|
||||
/* obsoleted by detail in <div>
|
||||
function showOutput(id, name) {
|
||||
var w = window.open("", //url
|
||||
name,
|
||||
"resizable,scrollbars,status,width=800,height=450");
|
||||
d = w.document;
|
||||
d.write("<pre>");
|
||||
d.write(html_escape(output_list[id]));
|
||||
d.write("\n");
|
||||
d.write("<a href='javascript:window.close()'>close</a>\n");
|
||||
d.write("</pre>\n");
|
||||
d.close();
|
||||
}
|
||||
*/
|
||||
--></script>
|
||||
|
||||
<div class='heading'>
|
||||
<h1>管有账测试报告</h1>
|
||||
<p class='attribute'><strong>Start Time:</strong> 2018-02-01 17:02:27</p>
|
||||
<p class='attribute'><strong>Duration:</strong> 0:00:31.268738</p>
|
||||
<p class='attribute'><strong>Status:</strong> Error 1</p>
|
||||
|
||||
<p class='description'>测试用例执行情况:</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<p id='show_detail_line'>Show
|
||||
<a href='javascript:showCase(0)'>Summary</a>
|
||||
<a href='javascript:showCase(1)'>Failed</a>
|
||||
<a href='javascript:showCase(2)'>All</a>
|
||||
</p>
|
||||
<table id='result_table'>
|
||||
<colgroup>
|
||||
<col align='left' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
</colgroup>
|
||||
<tr id='header_row'>
|
||||
<td>Test Group/Test case</td>
|
||||
<td>Count</td>
|
||||
<td>Pass</td>
|
||||
<td>Fail</td>
|
||||
<td>Error</td>
|
||||
<td>View</td>
|
||||
</tr>
|
||||
|
||||
<tr class='errorClass'>
|
||||
<td>test_case.external.create_company.create_comp_spec.CreateCompSpec</td>
|
||||
<td>1</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>1</td>
|
||||
<td><a href="javascript:showClassDetail('c1',1)">Detail</a></td>
|
||||
</tr>
|
||||
|
||||
<tr id='ft1.1' class='none'>
|
||||
<td class='errorCase'><div class='testcase'>test_verify_create_comp: 确认创建帐套功能,创建成功</div></td>
|
||||
<td colspan='5' align='center'>
|
||||
|
||||
<!--css div popup start-->
|
||||
<a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_ft1.1')" >
|
||||
error</a>
|
||||
|
||||
<div id='div_ft1.1' class="popup_window">
|
||||
<div style='text-align: right; color:red;cursor:pointer'>
|
||||
<a onfocus='this.blur();' onclick="document.getElementById('div_ft1.1').style.display = 'none' " >
|
||||
[x]</a>
|
||||
</div>
|
||||
<pre>
|
||||
|
||||
ft1.1: is_disapeared=> False
|
||||
创建帐套页面now
|
||||
create_comp_info=> ['创建帐套测试', '北京有序云创有限公司', '2013小企业会计准则', '一般纳税人', '', 8.0, '2018', '8', '2', '金慧', '10000', '123', 'IT、信息、软件、技术服务', '北京市', '市辖区', '海淀区', 'msg_save', 'create_save', '测试创建帐套', '创建成功', '正例']
|
||||
comp_num_loc=> <selenium.webdriver.remote.webelement.WebElement (session="632c052eb6888def02e515458f110047", element="0.7543973201008587-2")>
|
||||
comp_num= 创建帐套测试
|
||||
num=> 创建帐套测试2330
|
||||
is_disapeared=> False
|
||||
is_disapeared=> False
|
||||
is_disapeared=> False
|
||||
is_disapeared=> False
|
||||
month_index=> 7
|
||||
is_disapeared=> False
|
||||
未查到详细信息 填写
|
||||
text=> 未查到详细信息 填写
|
||||
is_disapeared=> False
|
||||
is_disapeared=> False
|
||||
is_disapeared=> False
|
||||
is_disapeared=> False
|
||||
is_disapeared=> False
|
||||
is_disapeared=> False
|
||||
is_disapeared=> False
|
||||
is_disapeared=> False
|
||||
is_disapeared=> False
|
||||
is_disapeared=> False
|
||||
按钮名称: 帐套信息保存
|
||||
is_disapeared=> False
|
||||
按钮名称: 保存创建
|
||||
is_disapeared=> False
|
||||
Traceback (most recent call last):
|
||||
File "/Users/huangcaiyan/work/e2e-test/test_case/external/create_company/create_comp_spec.py", line 46, in test_verify_create_comp
|
||||
comp_names = compLisPage.get_comp_name_list()
|
||||
File "/Users/huangcaiyan/work/e2e-test/test_case/external/comp_list/comp_list_page.py", line 101, in get_comp_name_list
|
||||
name_loc = tr_locs[ tr_index ].find_element_by_xpath( name_xpath )
|
||||
File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/webelement.py", line 263, in find_element_by_xpath
|
||||
return self.find_element(by=By.XPATH, value=xpath)
|
||||
File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/webelement.py", line 518, in find_element
|
||||
{"using": by, "value": value})['value']
|
||||
File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/webelement.py", line 501, in _execute
|
||||
return self._parent.execute(command, params)
|
||||
File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 308, in execute
|
||||
self.error_handler.check_response(response)
|
||||
File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response
|
||||
raise exception_class(message, screen, stacktrace)
|
||||
selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: element is not attached to the page document
|
||||
(Session info: chrome=63.0.3239.132)
|
||||
(Driver info: chromedriver=2.33.506106 (8a06c39c4582fbfbab6966dbb1c38a9173bfb1a2),platform=Mac OS X 10.11.6 x86_64)
|
||||
|
||||
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
<!--css div popup end-->
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id='total_row'>
|
||||
<td>Total</td>
|
||||
<td>1</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>1</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id='ending'> </div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,373 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>管有账测试报告</title>
|
||||
<meta name="generator" content="HTMLTestRunner 0.8.2"/>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
|
||||
<style type="text/css" media="screen">
|
||||
body { font-family: verdana, arial, helvetica, sans-serif; font-size: 80%; }
|
||||
table { font-size: 100%; }
|
||||
pre { }
|
||||
|
||||
/* -- heading ---------------------------------------------------------------------- */
|
||||
h1 {
|
||||
font-size: 16pt;
|
||||
color: gray;
|
||||
}
|
||||
.heading {
|
||||
margin-top: 0ex;
|
||||
margin-bottom: 1ex;
|
||||
}
|
||||
|
||||
.heading .attribute {
|
||||
margin-top: 1ex;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.heading .description {
|
||||
margin-top: 4ex;
|
||||
margin-bottom: 6ex;
|
||||
}
|
||||
|
||||
/* -- css div popup ------------------------------------------------------------------------ */
|
||||
a.popup_link {
|
||||
}
|
||||
|
||||
a.popup_link:hover {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.popup_window {
|
||||
display: none;
|
||||
position: relative;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
/*border: solid #627173 1px; */
|
||||
padding: 10px;
|
||||
background-color: #E6E6D6;
|
||||
font-family: "Lucida Console", "Courier New", Courier, monospace;
|
||||
text-align: left;
|
||||
font-size: 8pt;
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
}
|
||||
/* -- report ------------------------------------------------------------------------ */
|
||||
#show_detail_line {
|
||||
margin-top: 3ex;
|
||||
margin-bottom: 1ex;
|
||||
}
|
||||
#result_table {
|
||||
width: 80%;
|
||||
border-collapse: collapse;
|
||||
border: 1px solid #777;
|
||||
}
|
||||
#header_row {
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
background-color: #777;
|
||||
}
|
||||
#result_table td {
|
||||
border: 1px solid #777;
|
||||
padding: 2px;
|
||||
}
|
||||
#total_row { font-weight: bold; }
|
||||
.passClass { background-color: #6c6; }
|
||||
.failClass { background-color: #c60; }
|
||||
.errorClass { background-color: #c00; }
|
||||
.passCase { color: #6c6; }
|
||||
.failCase { color: #c60; font-weight: bold; }
|
||||
.errorCase { color: #c00; font-weight: bold; }
|
||||
.hiddenRow { display: none; }
|
||||
.testcase { margin-left: 2em; }
|
||||
|
||||
|
||||
/* -- ending ---------------------------------------------------------------------- */
|
||||
#ending {
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<script language="javascript" type="text/javascript"><!--
|
||||
output_list = Array();
|
||||
|
||||
/* level - 0:Summary; 1:Failed; 2:All */
|
||||
function showCase(level) {
|
||||
trs = document.getElementsByTagName("tr");
|
||||
for (var i = 0; i < trs.length; i++) {
|
||||
tr = trs[i];
|
||||
id = tr.id;
|
||||
if (id.substr(0,2) == 'ft') {
|
||||
if (level < 1) {
|
||||
tr.className = 'hiddenRow';
|
||||
}
|
||||
else {
|
||||
tr.className = '';
|
||||
}
|
||||
}
|
||||
if (id.substr(0,2) == 'pt') {
|
||||
if (level > 1) {
|
||||
tr.className = '';
|
||||
}
|
||||
else {
|
||||
tr.className = 'hiddenRow';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function showClassDetail(cid, count) {
|
||||
var id_list = Array(count);
|
||||
var toHide = 1;
|
||||
for (var i = 0; i < count; i++) {
|
||||
tid0 = 't' + cid.substr(1) + '.' + (i+1);
|
||||
tid = 'f' + tid0;
|
||||
tr = document.getElementById(tid);
|
||||
if (!tr) {
|
||||
tid = 'p' + tid0;
|
||||
tr = document.getElementById(tid);
|
||||
}
|
||||
id_list[i] = tid;
|
||||
if (tr.className) {
|
||||
toHide = 0;
|
||||
}
|
||||
}
|
||||
for (var i = 0; i < count; i++) {
|
||||
tid = id_list[i];
|
||||
if (toHide) {
|
||||
document.getElementById('div_'+tid).style.display = 'none'
|
||||
document.getElementById(tid).className = 'hiddenRow';
|
||||
}
|
||||
else {
|
||||
document.getElementById(tid).className = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function showTestDetail(div_id){
|
||||
var details_div = document.getElementById(div_id)
|
||||
var displayState = details_div.style.display
|
||||
// alert(displayState)
|
||||
if (displayState != 'block' ) {
|
||||
displayState = 'block'
|
||||
details_div.style.display = 'block'
|
||||
}
|
||||
else {
|
||||
details_div.style.display = 'none'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function html_escape(s) {
|
||||
s = s.replace(/&/g,'&');
|
||||
s = s.replace(/</g,'<');
|
||||
s = s.replace(/>/g,'>');
|
||||
return s;
|
||||
}
|
||||
|
||||
/* obsoleted by detail in <div>
|
||||
function showOutput(id, name) {
|
||||
var w = window.open("", //url
|
||||
name,
|
||||
"resizable,scrollbars,status,width=800,height=450");
|
||||
d = w.document;
|
||||
d.write("<pre>");
|
||||
d.write(html_escape(output_list[id]));
|
||||
d.write("\n");
|
||||
d.write("<a href='javascript:window.close()'>close</a>\n");
|
||||
d.write("</pre>\n");
|
||||
d.close();
|
||||
}
|
||||
*/
|
||||
--></script>
|
||||
|
||||
<div class='heading'>
|
||||
<h1>管有账测试报告</h1>
|
||||
<p class='attribute'><strong>Start Time:</strong> 2018-02-01 17:08:37</p>
|
||||
<p class='attribute'><strong>Duration:</strong> 0:00:36.822587</p>
|
||||
<p class='attribute'><strong>Status:</strong> Failure 1</p>
|
||||
|
||||
<p class='description'>测试用例执行情况:</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<p id='show_detail_line'>Show
|
||||
<a href='javascript:showCase(0)'>Summary</a>
|
||||
<a href='javascript:showCase(1)'>Failed</a>
|
||||
<a href='javascript:showCase(2)'>All</a>
|
||||
</p>
|
||||
<table id='result_table'>
|
||||
<colgroup>
|
||||
<col align='left' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
</colgroup>
|
||||
<tr id='header_row'>
|
||||
<td>Test Group/Test case</td>
|
||||
<td>Count</td>
|
||||
<td>Pass</td>
|
||||
<td>Fail</td>
|
||||
<td>Error</td>
|
||||
<td>View</td>
|
||||
</tr>
|
||||
|
||||
<tr class='failClass'>
|
||||
<td>test_case.external.create_company.create_comp_spec.CreateCompSpec</td>
|
||||
<td>1</td>
|
||||
<td>0</td>
|
||||
<td>1</td>
|
||||
<td>0</td>
|
||||
<td><a href="javascript:showClassDetail('c1',1)">Detail</a></td>
|
||||
</tr>
|
||||
|
||||
<tr id='ft1.1' class='none'>
|
||||
<td class='failCase'><div class='testcase'>test_verify_create_comp: 确认创建帐套功能,创建成功</div></td>
|
||||
<td colspan='5' align='center'>
|
||||
|
||||
<!--css div popup start-->
|
||||
<a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_ft1.1')" >
|
||||
fail</a>
|
||||
|
||||
<div id='div_ft1.1' class="popup_window">
|
||||
<div style='text-align: right; color:red;cursor:pointer'>
|
||||
<a onfocus='this.blur();' onclick="document.getElementById('div_ft1.1').style.display = 'none' " >
|
||||
[x]</a>
|
||||
</div>
|
||||
<pre>
|
||||
|
||||
ft1.1: 创建帐套页面now
|
||||
create_comp_info=> ['创建帐套测试', '北京有序云创有限公司', '2013小企业会计准则', '一般纳税人', '', 8.0, '2018', '8', '2', '金慧', '10000', '123', 'IT、信息、软件、技术服务', '北京市', '市辖区', '海淀区', 'msg_save', 'create_save', '测试创建帐套', '创建成功', '正例']
|
||||
comp_num_loc=> <selenium.webdriver.remote.webelement.WebElement (session="6fef4be01b09c065cc3c45603a9ba238", element="0.5085953237246987-2")>
|
||||
comp_num= 创建帐套测试
|
||||
num=> 创建帐套测试1312
|
||||
month_index=> 7
|
||||
未查到详细信息 填写
|
||||
text=> 未查到详细信息 填写
|
||||
按钮名称: 帐套信息保存
|
||||
按钮名称: 保存创建
|
||||
固定yk
|
||||
公司0714-2
|
||||
|
||||
|
||||
固定资产(最后一期折旧测试)
|
||||
公司0719-1
|
||||
公司0719-2
|
||||
公司0719-3
|
||||
|
||||
gd
|
||||
autotestyb
|
||||
0824大数据测试
|
||||
yiban有序(勿动)
|
||||
21221
|
||||
哈哈哈
|
||||
张宇迪
|
||||
1q1q
|
||||
期初-一般test
|
||||
LCK-YB
|
||||
小规模dddd
|
||||
yiban0804
|
||||
0810yiban冒烟测试
|
||||
0810yiban测试(勿动)
|
||||
|
||||
0927smokeTestComp0905
|
||||
0905冒烟测试公司7
|
||||
0905测试公司1
|
||||
|
||||
|
||||
0905测试公司5
|
||||
0905测试公司6
|
||||
|
||||
0927smokeTestCompyb0905
|
||||
0905测试公司9
|
||||
0905测试公司10
|
||||
0905测试公司11
|
||||
0905测试公司12
|
||||
0905测试公司13
|
||||
0905测试公司14
|
||||
0905测试公司15
|
||||
0905测试公司16
|
||||
0905测试公司17
|
||||
0905测试公司18
|
||||
0905测试公司19
|
||||
0905测试公司20
|
||||
0905测试公司21
|
||||
0905测试公司22
|
||||
0905测试公司23
|
||||
0905测试公司24
|
||||
0905测试公司25
|
||||
0905测试公司26
|
||||
0905测试公司27
|
||||
0905测试公司28
|
||||
0905测试公司29
|
||||
有序1
|
||||
有序2
|
||||
有序3
|
||||
资产负债0914
|
||||
|
||||
抵扣认证日期验证0916
|
||||
Aggrid
|
||||
0927创建公司测试冒烟
|
||||
0927创建公司小规模测试
|
||||
123
|
||||
7月开始启用
|
||||
跨年测试11月启用yb
|
||||
启用测试
|
||||
测试
|
||||
testyb
|
||||
|
||||
|
||||
跨年测试1月启用yb
|
||||
|
||||
12月启用跨年测试
|
||||
1130
|
||||
上海达尔威贸易有限公司
|
||||
|
||||
北京第一村
|
||||
北京有序科技有限公司
|
||||
北京有序云创有限公司8392
|
||||
北京有序云创有限公司6993
|
||||
北京有序云创有限公司1419
|
||||
北京有序云创有限公司3981
|
||||
北京有序云创有限公司2157
|
||||
北京有序云创有限公司7217
|
||||
北京有序云创有限公司3629
|
||||
北京有序云创有限公司5837
|
||||
北京有序云创有限公司8247
|
||||
comp_name_list= ['固定yk', '公司0714-2', '', '', '固定资产(最后一期折旧测试)', '公司0719-1', '公司0719-2', '公司0719-3', '', 'gd', 'autotestyb', '0824大数据测试', 'yiban有序(勿动)', '21221', '哈哈哈', '张宇迪', '1q1q', '期初-一般test', 'LCK-YB', '小规模dddd', 'yiban0804', '0810yiban冒烟测试', '0810yiban测试(勿动)', '', '0927smokeTestComp0905', '0905冒烟测试公司7', '0905测试公司1', '', '', '0905测试公司5', '0905测试公司6', '', '0927smokeTestCompyb0905', '0905测试公司9', '0905测试公司10', '0905测试公司11', '0905测试公司12', '0905测试公司13', '0905测试公司14', '0905测试公司15', '0905测试公司16', '0905测试公司17', '0905测试公司18', '0905测试公司19', '0905测试公司20', '0905测试公司21', '0905测试公司22', '0905测试公司23', '0905测试公司24', '0905测试公司25', '0905测试公司26', '0905测试公司27', '0905测试公司28', '0905测试公司29', '有序1', '有序2', '有序3', '资产负债0914', '', '抵扣认证日期验证0916', 'Aggrid', '0927创建公司测试冒烟', '0927创建公司小规模测试', '123', '7月开始启用', '跨年测试11月启用yb', '启用测试', '测试', 'testyb', '', '', '跨年测试1月启用yb', '', '12月启用跨年测试', '1130', '上海达尔威贸易有限公司', '', '北京第一村', '北京有序科技有限公司', '北京有序云创有限公司8392', '北京有序云创有限公司6993', '北京有序云创有限公司1419', '北京有序云创有限公司3981', '北京有序云创有限公司2157', '北京有序云创有限公司7217', '北京有序云创有限公司3629', '北京有序云创有限公司5837', '北京有序云创有限公司8247']
|
||||
Traceback (most recent call last):
|
||||
File "/Users/huangcaiyan/work/e2e-test/test_case/external/create_company/create_comp_spec.py", line 49, in test_verify_create_comp
|
||||
self.assertIn(comp_data[1],comp_names)
|
||||
AssertionError: '北京有序云创有限公司' not found in ['固定yk', '公司0714-2', '', '', '固定资产(最后一期折旧测试)', '公司0719-1', '公司0719-2', '公司0719-3', '', 'gd', 'autotestyb', '0824大数据测试', 'yiban有序(勿动)', '21221', '哈哈哈', '张宇迪', '1q1q', '期初-一般test', 'LCK-YB', '小规模dddd', 'yiban0804', '0810yiban冒烟测试', '0810yiban测试(勿动)', '', '0927smokeTestComp0905', '0905冒烟测试公司7', '0905测试公司1', '', '', '0905测试公司5', '0905测试公司6', '', '0927smokeTestCompyb0905', '0905测试公司9', '0905测试公司10', '0905测试公司11', '0905测试公司12', '0905测试公司13', '0905测试公司14', '0905测试公司15', '0905测试公司16', '0905测试公司17', '0905测试公司18', '0905测试公司19', '0905测试公司20', '0905测试公司21', '0905测试公司22', '0905测试公司23', '0905测试公司24', '0905测试公司25', '0905测试公司26', '0905测试公司27', '0905测试公司28', '0905测试公司29', '有序1', '有序2', '有序3', '资产负债0914', '', '抵扣认证日期验证0916', 'Aggrid', '0927创建公司测试冒烟', '0927创建公司小规模测试', '123', '7月开始启用', '跨年测试11月启用yb', '启用测试', '测试', 'testyb', '', '', '跨年测试1月启用yb', '', '12月启用跨年测试', '1130', '上海达尔威贸易有限公司', '', '北京第一村', '北京有序科技有限公司', '北京有序云创有限公司8392', '北京有序云创有限公司6993', '北京有序云创有限公司1419', '北京有序云创有限公司3981', '北京有序云创有限公司2157', '北京有序云创有限公司7217', '北京有序云创有限公司3629', '北京有序云创有限公司5837', '北京有序云创有限公司8247']
|
||||
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
<!--css div popup end-->
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id='total_row'>
|
||||
<td>Total</td>
|
||||
<td>1</td>
|
||||
<td>0</td>
|
||||
<td>1</td>
|
||||
<td>0</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id='ending'> </div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,388 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>管有账测试报告</title>
|
||||
<meta name="generator" content="HTMLTestRunner 0.8.2"/>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
|
||||
<style type="text/css" media="screen">
|
||||
body { font-family: verdana, arial, helvetica, sans-serif; font-size: 80%; }
|
||||
table { font-size: 100%; }
|
||||
pre { }
|
||||
|
||||
/* -- heading ---------------------------------------------------------------------- */
|
||||
h1 {
|
||||
font-size: 16pt;
|
||||
color: gray;
|
||||
}
|
||||
.heading {
|
||||
margin-top: 0ex;
|
||||
margin-bottom: 1ex;
|
||||
}
|
||||
|
||||
.heading .attribute {
|
||||
margin-top: 1ex;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.heading .description {
|
||||
margin-top: 4ex;
|
||||
margin-bottom: 6ex;
|
||||
}
|
||||
|
||||
/* -- css div popup ------------------------------------------------------------------------ */
|
||||
a.popup_link {
|
||||
}
|
||||
|
||||
a.popup_link:hover {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.popup_window {
|
||||
display: none;
|
||||
position: relative;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
/*border: solid #627173 1px; */
|
||||
padding: 10px;
|
||||
background-color: #E6E6D6;
|
||||
font-family: "Lucida Console", "Courier New", Courier, monospace;
|
||||
text-align: left;
|
||||
font-size: 8pt;
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
}
|
||||
/* -- report ------------------------------------------------------------------------ */
|
||||
#show_detail_line {
|
||||
margin-top: 3ex;
|
||||
margin-bottom: 1ex;
|
||||
}
|
||||
#result_table {
|
||||
width: 80%;
|
||||
border-collapse: collapse;
|
||||
border: 1px solid #777;
|
||||
}
|
||||
#header_row {
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
background-color: #777;
|
||||
}
|
||||
#result_table td {
|
||||
border: 1px solid #777;
|
||||
padding: 2px;
|
||||
}
|
||||
#total_row { font-weight: bold; }
|
||||
.passClass { background-color: #6c6; }
|
||||
.failClass { background-color: #c60; }
|
||||
.errorClass { background-color: #c00; }
|
||||
.passCase { color: #6c6; }
|
||||
.failCase { color: #c60; font-weight: bold; }
|
||||
.errorCase { color: #c00; font-weight: bold; }
|
||||
.hiddenRow { display: none; }
|
||||
.testcase { margin-left: 2em; }
|
||||
|
||||
|
||||
/* -- ending ---------------------------------------------------------------------- */
|
||||
#ending {
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<script language="javascript" type="text/javascript"><!--
|
||||
output_list = Array();
|
||||
|
||||
/* level - 0:Summary; 1:Failed; 2:All */
|
||||
function showCase(level) {
|
||||
trs = document.getElementsByTagName("tr");
|
||||
for (var i = 0; i < trs.length; i++) {
|
||||
tr = trs[i];
|
||||
id = tr.id;
|
||||
if (id.substr(0,2) == 'ft') {
|
||||
if (level < 1) {
|
||||
tr.className = 'hiddenRow';
|
||||
}
|
||||
else {
|
||||
tr.className = '';
|
||||
}
|
||||
}
|
||||
if (id.substr(0,2) == 'pt') {
|
||||
if (level > 1) {
|
||||
tr.className = '';
|
||||
}
|
||||
else {
|
||||
tr.className = 'hiddenRow';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function showClassDetail(cid, count) {
|
||||
var id_list = Array(count);
|
||||
var toHide = 1;
|
||||
for (var i = 0; i < count; i++) {
|
||||
tid0 = 't' + cid.substr(1) + '.' + (i+1);
|
||||
tid = 'f' + tid0;
|
||||
tr = document.getElementById(tid);
|
||||
if (!tr) {
|
||||
tid = 'p' + tid0;
|
||||
tr = document.getElementById(tid);
|
||||
}
|
||||
id_list[i] = tid;
|
||||
if (tr.className) {
|
||||
toHide = 0;
|
||||
}
|
||||
}
|
||||
for (var i = 0; i < count; i++) {
|
||||
tid = id_list[i];
|
||||
if (toHide) {
|
||||
document.getElementById('div_'+tid).style.display = 'none'
|
||||
document.getElementById(tid).className = 'hiddenRow';
|
||||
}
|
||||
else {
|
||||
document.getElementById(tid).className = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function showTestDetail(div_id){
|
||||
var details_div = document.getElementById(div_id)
|
||||
var displayState = details_div.style.display
|
||||
// alert(displayState)
|
||||
if (displayState != 'block' ) {
|
||||
displayState = 'block'
|
||||
details_div.style.display = 'block'
|
||||
}
|
||||
else {
|
||||
details_div.style.display = 'none'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function html_escape(s) {
|
||||
s = s.replace(/&/g,'&');
|
||||
s = s.replace(/</g,'<');
|
||||
s = s.replace(/>/g,'>');
|
||||
return s;
|
||||
}
|
||||
|
||||
/* obsoleted by detail in <div>
|
||||
function showOutput(id, name) {
|
||||
var w = window.open("", //url
|
||||
name,
|
||||
"resizable,scrollbars,status,width=800,height=450");
|
||||
d = w.document;
|
||||
d.write("<pre>");
|
||||
d.write(html_escape(output_list[id]));
|
||||
d.write("\n");
|
||||
d.write("<a href='javascript:window.close()'>close</a>\n");
|
||||
d.write("</pre>\n");
|
||||
d.close();
|
||||
}
|
||||
*/
|
||||
--></script>
|
||||
|
||||
<div class='heading'>
|
||||
<h1>管有账测试报告</h1>
|
||||
<p class='attribute'><strong>Start Time:</strong> 2018-02-01 17:16:20</p>
|
||||
<p class='attribute'><strong>Duration:</strong> 0:00:37.894317</p>
|
||||
<p class='attribute'><strong>Status:</strong> Error 1</p>
|
||||
|
||||
<p class='description'>测试用例执行情况:</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<p id='show_detail_line'>Show
|
||||
<a href='javascript:showCase(0)'>Summary</a>
|
||||
<a href='javascript:showCase(1)'>Failed</a>
|
||||
<a href='javascript:showCase(2)'>All</a>
|
||||
</p>
|
||||
<table id='result_table'>
|
||||
<colgroup>
|
||||
<col align='left' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
</colgroup>
|
||||
<tr id='header_row'>
|
||||
<td>Test Group/Test case</td>
|
||||
<td>Count</td>
|
||||
<td>Pass</td>
|
||||
<td>Fail</td>
|
||||
<td>Error</td>
|
||||
<td>View</td>
|
||||
</tr>
|
||||
|
||||
<tr class='errorClass'>
|
||||
<td>test_case.external.create_company.create_comp_spec.CreateCompSpec</td>
|
||||
<td>1</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>1</td>
|
||||
<td><a href="javascript:showClassDetail('c1',1)">Detail</a></td>
|
||||
</tr>
|
||||
|
||||
<tr id='ft1.1' class='none'>
|
||||
<td class='errorCase'><div class='testcase'>test_verify_create_comp: 确认创建帐套功能,创建成功</div></td>
|
||||
<td colspan='5' align='center'>
|
||||
|
||||
<!--css div popup start-->
|
||||
<a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_ft1.1')" >
|
||||
error</a>
|
||||
|
||||
<div id='div_ft1.1' class="popup_window">
|
||||
<div style='text-align: right; color:red;cursor:pointer'>
|
||||
<a onfocus='this.blur();' onclick="document.getElementById('div_ft1.1').style.display = 'none' " >
|
||||
[x]</a>
|
||||
</div>
|
||||
<pre>
|
||||
|
||||
ft1.1: 固定yk
|
||||
公司0714-2
|
||||
|
||||
|
||||
固定资产(最后一期折旧测试)
|
||||
公司0719-1
|
||||
公司0719-2
|
||||
公司0719-3
|
||||
|
||||
gd
|
||||
autotestyb
|
||||
0824大数据测试
|
||||
yiban有序(勿动)
|
||||
21221
|
||||
哈哈哈
|
||||
张宇迪
|
||||
1q1q
|
||||
期初-一般test
|
||||
LCK-YB
|
||||
小规模dddd
|
||||
yiban0804
|
||||
0810yiban冒烟测试
|
||||
0810yiban测试(勿动)
|
||||
|
||||
0927smokeTestComp0905
|
||||
0905冒烟测试公司7
|
||||
0905测试公司1
|
||||
|
||||
|
||||
0905测试公司5
|
||||
0905测试公司6
|
||||
|
||||
0927smokeTestCompyb0905
|
||||
0905测试公司9
|
||||
0905测试公司10
|
||||
0905测试公司11
|
||||
0905测试公司12
|
||||
0905测试公司13
|
||||
0905测试公司14
|
||||
0905测试公司15
|
||||
0905测试公司16
|
||||
0905测试公司17
|
||||
0905测试公司18
|
||||
0905测试公司19
|
||||
0905测试公司20
|
||||
0905测试公司21
|
||||
0905测试公司22
|
||||
0905测试公司23
|
||||
0905测试公司24
|
||||
0905测试公司25
|
||||
0905测试公司26
|
||||
0905测试公司27
|
||||
0905测试公司28
|
||||
0905测试公司29
|
||||
有序1
|
||||
有序2
|
||||
有序3
|
||||
资产负债0914
|
||||
|
||||
抵扣认证日期验证0916
|
||||
Aggrid
|
||||
0927创建公司测试冒烟
|
||||
0927创建公司小规模测试
|
||||
123
|
||||
7月开始启用
|
||||
跨年测试11月启用yb
|
||||
启用测试
|
||||
测试
|
||||
testyb
|
||||
|
||||
|
||||
跨年测试1月启用yb
|
||||
|
||||
12月启用跨年测试
|
||||
1130
|
||||
上海达尔威贸易有限公司
|
||||
|
||||
北京第一村
|
||||
北京有序科技有限公司
|
||||
北京有序云创有限公司8392
|
||||
北京有序云创有限公司6993
|
||||
北京有序云创有限公司1419
|
||||
北京有序云创有限公司3981
|
||||
北京有序云创有限公司2157
|
||||
北京有序云创有限公司7217
|
||||
北京有序云创有限公司3629
|
||||
北京有序云创有限公司5837
|
||||
北京有序云创有限公司8247
|
||||
comp_name_list= ['固定yk', '公司0714-2', '', '', '固定资产(最后一期折旧测试)', '公司0719-1', '公司0719-2', '公司0719-3', '', 'gd', 'autotestyb', '0824大数据测试', 'yiban有序(勿动)', '21221', '哈哈哈', '张宇迪', '1q1q', '期初-一般test', 'LCK-YB', '小规模dddd', 'yiban0804', '0810yiban冒烟测试', '0810yiban测试(勿动)', '', '0927smokeTestComp0905', '0905冒烟测试公司7', '0905测试公司1', '', '', '0905测试公司5', '0905测试公司6', '', '0927smokeTestCompyb0905', '0905测试公司9', '0905测试公司10', '0905测试公司11', '0905测试公司12', '0905测试公司13', '0905测试公司14', '0905测试公司15', '0905测试公司16', '0905测试公司17', '0905测试公司18', '0905测试公司19', '0905测试公司20', '0905测试公司21', '0905测试公司22', '0905测试公司23', '0905测试公司24', '0905测试公司25', '0905测试公司26', '0905测试公司27', '0905测试公司28', '0905测试公司29', '有序1', '有序2', '有序3', '资产负债0914', '', '抵扣认证日期验证0916', 'Aggrid', '0927创建公司测试冒烟', '0927创建公司小规模测试', '123', '7月开始启用', '跨年测试11月启用yb', '启用测试', '测试', 'testyb', '', '', '跨年测试1月启用yb', '', '12月启用跨年测试', '1130', '上海达尔威贸易有限公司', '', '北京第一村', '北京有序科技有限公司', '北京有序云创有限公司8392', '北京有序云创有限公司6993', '北京有序云创有限公司1419', '北京有序云创有限公司3981', '北京有序云创有限公司2157', '北京有序云创有限公司7217', '北京有序云创有限公司3629', '北京有序云创有限公司5837', '北京有序云创有限公司8247']
|
||||
创建帐套页面now
|
||||
create_comp_info=> ['创建帐套测试', '北京有序云创有限公司', '2013小企业会计准则', '一般纳税人', '', 8.0, '2018', '8', '2', '金慧', '10000', '123', 'IT、信息、软件、技术服务', '北京市', '市辖区', '海淀区', 'msg_save', 'create_save', '测试创建帐套', '创建成功', '正例']
|
||||
comp_num_loc=> <selenium.webdriver.remote.webelement.WebElement (session="076b8b094a0bd9fc4b4f34801892fb07", element="0.216546441380415-2")>
|
||||
comp_num= 创建帐套测试
|
||||
num=> 创建帐套测试851
|
||||
month_index=> 7
|
||||
未查到详细信息 填写
|
||||
text=> 未查到详细信息 填写
|
||||
按钮名称: 帐套信息保存
|
||||
按钮名称: 保存创建
|
||||
Traceback (most recent call last):
|
||||
File "/Users/huangcaiyan/work/e2e-test/test_case/external/create_company/create_comp_spec.py", line 48, in test_verify_create_comp
|
||||
new_comp_name_list_len = (compLisPage.get_comp_name_list())
|
||||
File "/Users/huangcaiyan/work/e2e-test/test_case/external/comp_list/comp_list_page.py", line 101, in get_comp_name_list
|
||||
name_loc = tr_locs[ tr_index ].find_element_by_xpath( name_xpath )
|
||||
File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/webelement.py", line 263, in find_element_by_xpath
|
||||
return self.find_element(by=By.XPATH, value=xpath)
|
||||
File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/webelement.py", line 518, in find_element
|
||||
{"using": by, "value": value})['value']
|
||||
File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/webelement.py", line 501, in _execute
|
||||
return self._parent.execute(command, params)
|
||||
File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 308, in execute
|
||||
self.error_handler.check_response(response)
|
||||
File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response
|
||||
raise exception_class(message, screen, stacktrace)
|
||||
selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: element is not attached to the page document
|
||||
(Session info: chrome=63.0.3239.132)
|
||||
(Driver info: chromedriver=2.33.506106 (8a06c39c4582fbfbab6966dbb1c38a9173bfb1a2),platform=Mac OS X 10.11.6 x86_64)
|
||||
|
||||
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
<!--css div popup end-->
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id='total_row'>
|
||||
<td>Total</td>
|
||||
<td>1</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>1</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id='ending'> </div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,389 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>管有账测试报告</title>
|
||||
<meta name="generator" content="HTMLTestRunner 0.8.2"/>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
|
||||
<style type="text/css" media="screen">
|
||||
body { font-family: verdana, arial, helvetica, sans-serif; font-size: 80%; }
|
||||
table { font-size: 100%; }
|
||||
pre { }
|
||||
|
||||
/* -- heading ---------------------------------------------------------------------- */
|
||||
h1 {
|
||||
font-size: 16pt;
|
||||
color: gray;
|
||||
}
|
||||
.heading {
|
||||
margin-top: 0ex;
|
||||
margin-bottom: 1ex;
|
||||
}
|
||||
|
||||
.heading .attribute {
|
||||
margin-top: 1ex;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.heading .description {
|
||||
margin-top: 4ex;
|
||||
margin-bottom: 6ex;
|
||||
}
|
||||
|
||||
/* -- css div popup ------------------------------------------------------------------------ */
|
||||
a.popup_link {
|
||||
}
|
||||
|
||||
a.popup_link:hover {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.popup_window {
|
||||
display: none;
|
||||
position: relative;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
/*border: solid #627173 1px; */
|
||||
padding: 10px;
|
||||
background-color: #E6E6D6;
|
||||
font-family: "Lucida Console", "Courier New", Courier, monospace;
|
||||
text-align: left;
|
||||
font-size: 8pt;
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
}
|
||||
/* -- report ------------------------------------------------------------------------ */
|
||||
#show_detail_line {
|
||||
margin-top: 3ex;
|
||||
margin-bottom: 1ex;
|
||||
}
|
||||
#result_table {
|
||||
width: 80%;
|
||||
border-collapse: collapse;
|
||||
border: 1px solid #777;
|
||||
}
|
||||
#header_row {
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
background-color: #777;
|
||||
}
|
||||
#result_table td {
|
||||
border: 1px solid #777;
|
||||
padding: 2px;
|
||||
}
|
||||
#total_row { font-weight: bold; }
|
||||
.passClass { background-color: #6c6; }
|
||||
.failClass { background-color: #c60; }
|
||||
.errorClass { background-color: #c00; }
|
||||
.passCase { color: #6c6; }
|
||||
.failCase { color: #c60; font-weight: bold; }
|
||||
.errorCase { color: #c00; font-weight: bold; }
|
||||
.hiddenRow { display: none; }
|
||||
.testcase { margin-left: 2em; }
|
||||
|
||||
|
||||
/* -- ending ---------------------------------------------------------------------- */
|
||||
#ending {
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<script language="javascript" type="text/javascript"><!--
|
||||
output_list = Array();
|
||||
|
||||
/* level - 0:Summary; 1:Failed; 2:All */
|
||||
function showCase(level) {
|
||||
trs = document.getElementsByTagName("tr");
|
||||
for (var i = 0; i < trs.length; i++) {
|
||||
tr = trs[i];
|
||||
id = tr.id;
|
||||
if (id.substr(0,2) == 'ft') {
|
||||
if (level < 1) {
|
||||
tr.className = 'hiddenRow';
|
||||
}
|
||||
else {
|
||||
tr.className = '';
|
||||
}
|
||||
}
|
||||
if (id.substr(0,2) == 'pt') {
|
||||
if (level > 1) {
|
||||
tr.className = '';
|
||||
}
|
||||
else {
|
||||
tr.className = 'hiddenRow';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function showClassDetail(cid, count) {
|
||||
var id_list = Array(count);
|
||||
var toHide = 1;
|
||||
for (var i = 0; i < count; i++) {
|
||||
tid0 = 't' + cid.substr(1) + '.' + (i+1);
|
||||
tid = 'f' + tid0;
|
||||
tr = document.getElementById(tid);
|
||||
if (!tr) {
|
||||
tid = 'p' + tid0;
|
||||
tr = document.getElementById(tid);
|
||||
}
|
||||
id_list[i] = tid;
|
||||
if (tr.className) {
|
||||
toHide = 0;
|
||||
}
|
||||
}
|
||||
for (var i = 0; i < count; i++) {
|
||||
tid = id_list[i];
|
||||
if (toHide) {
|
||||
document.getElementById('div_'+tid).style.display = 'none'
|
||||
document.getElementById(tid).className = 'hiddenRow';
|
||||
}
|
||||
else {
|
||||
document.getElementById(tid).className = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function showTestDetail(div_id){
|
||||
var details_div = document.getElementById(div_id)
|
||||
var displayState = details_div.style.display
|
||||
// alert(displayState)
|
||||
if (displayState != 'block' ) {
|
||||
displayState = 'block'
|
||||
details_div.style.display = 'block'
|
||||
}
|
||||
else {
|
||||
details_div.style.display = 'none'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function html_escape(s) {
|
||||
s = s.replace(/&/g,'&');
|
||||
s = s.replace(/</g,'<');
|
||||
s = s.replace(/>/g,'>');
|
||||
return s;
|
||||
}
|
||||
|
||||
/* obsoleted by detail in <div>
|
||||
function showOutput(id, name) {
|
||||
var w = window.open("", //url
|
||||
name,
|
||||
"resizable,scrollbars,status,width=800,height=450");
|
||||
d = w.document;
|
||||
d.write("<pre>");
|
||||
d.write(html_escape(output_list[id]));
|
||||
d.write("\n");
|
||||
d.write("<a href='javascript:window.close()'>close</a>\n");
|
||||
d.write("</pre>\n");
|
||||
d.close();
|
||||
}
|
||||
*/
|
||||
--></script>
|
||||
|
||||
<div class='heading'>
|
||||
<h1>管有账测试报告</h1>
|
||||
<p class='attribute'><strong>Start Time:</strong> 2018-02-01 17:18:15</p>
|
||||
<p class='attribute'><strong>Duration:</strong> 0:00:39.038193</p>
|
||||
<p class='attribute'><strong>Status:</strong> Error 1</p>
|
||||
|
||||
<p class='description'>测试用例执行情况:</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<p id='show_detail_line'>Show
|
||||
<a href='javascript:showCase(0)'>Summary</a>
|
||||
<a href='javascript:showCase(1)'>Failed</a>
|
||||
<a href='javascript:showCase(2)'>All</a>
|
||||
</p>
|
||||
<table id='result_table'>
|
||||
<colgroup>
|
||||
<col align='left' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
</colgroup>
|
||||
<tr id='header_row'>
|
||||
<td>Test Group/Test case</td>
|
||||
<td>Count</td>
|
||||
<td>Pass</td>
|
||||
<td>Fail</td>
|
||||
<td>Error</td>
|
||||
<td>View</td>
|
||||
</tr>
|
||||
|
||||
<tr class='errorClass'>
|
||||
<td>test_case.external.create_company.create_comp_spec.CreateCompSpec</td>
|
||||
<td>1</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>1</td>
|
||||
<td><a href="javascript:showClassDetail('c1',1)">Detail</a></td>
|
||||
</tr>
|
||||
|
||||
<tr id='ft1.1' class='none'>
|
||||
<td class='errorCase'><div class='testcase'>test_verify_create_comp: 确认创建帐套功能,创建成功</div></td>
|
||||
<td colspan='5' align='center'>
|
||||
|
||||
<!--css div popup start-->
|
||||
<a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_ft1.1')" >
|
||||
error</a>
|
||||
|
||||
<div id='div_ft1.1' class="popup_window">
|
||||
<div style='text-align: right; color:red;cursor:pointer'>
|
||||
<a onfocus='this.blur();' onclick="document.getElementById('div_ft1.1').style.display = 'none' " >
|
||||
[x]</a>
|
||||
</div>
|
||||
<pre>
|
||||
|
||||
ft1.1: 固定yk
|
||||
公司0714-2
|
||||
|
||||
|
||||
固定资产(最后一期折旧测试)
|
||||
公司0719-1
|
||||
公司0719-2
|
||||
公司0719-3
|
||||
|
||||
gd
|
||||
autotestyb
|
||||
0824大数据测试
|
||||
yiban有序(勿动)
|
||||
21221
|
||||
哈哈哈
|
||||
张宇迪
|
||||
1q1q
|
||||
期初-一般test
|
||||
LCK-YB
|
||||
小规模dddd
|
||||
yiban0804
|
||||
0810yiban冒烟测试
|
||||
0810yiban测试(勿动)
|
||||
|
||||
0927smokeTestComp0905
|
||||
0905冒烟测试公司7
|
||||
0905测试公司1
|
||||
|
||||
|
||||
0905测试公司5
|
||||
0905测试公司6
|
||||
|
||||
0927smokeTestCompyb0905
|
||||
0905测试公司9
|
||||
0905测试公司10
|
||||
0905测试公司11
|
||||
0905测试公司12
|
||||
0905测试公司13
|
||||
0905测试公司14
|
||||
0905测试公司15
|
||||
0905测试公司16
|
||||
0905测试公司17
|
||||
0905测试公司18
|
||||
0905测试公司19
|
||||
0905测试公司20
|
||||
0905测试公司21
|
||||
0905测试公司22
|
||||
0905测试公司23
|
||||
0905测试公司24
|
||||
0905测试公司25
|
||||
0905测试公司26
|
||||
0905测试公司27
|
||||
0905测试公司28
|
||||
0905测试公司29
|
||||
有序1
|
||||
有序2
|
||||
有序3
|
||||
资产负债0914
|
||||
|
||||
抵扣认证日期验证0916
|
||||
Aggrid
|
||||
0927创建公司测试冒烟
|
||||
0927创建公司小规模测试
|
||||
123
|
||||
7月开始启用
|
||||
跨年测试11月启用yb
|
||||
启用测试
|
||||
测试
|
||||
testyb
|
||||
|
||||
|
||||
跨年测试1月启用yb
|
||||
|
||||
12月启用跨年测试
|
||||
1130
|
||||
上海达尔威贸易有限公司
|
||||
|
||||
北京第一村
|
||||
北京有序科技有限公司
|
||||
北京有序云创有限公司8392
|
||||
北京有序云创有限公司6993
|
||||
北京有序云创有限公司1419
|
||||
北京有序云创有限公司3981
|
||||
北京有序云创有限公司2157
|
||||
北京有序云创有限公司7217
|
||||
北京有序云创有限公司3629
|
||||
北京有序云创有限公司5837
|
||||
北京有序云创有限公司8247
|
||||
北京有序云创有限公司7091
|
||||
comp_name_list= ['固定yk', '公司0714-2', '', '', '固定资产(最后一期折旧测试)', '公司0719-1', '公司0719-2', '公司0719-3', '', 'gd', 'autotestyb', '0824大数据测试', 'yiban有序(勿动)', '21221', '哈哈哈', '张宇迪', '1q1q', '期初-一般test', 'LCK-YB', '小规模dddd', 'yiban0804', '0810yiban冒烟测试', '0810yiban测试(勿动)', '', '0927smokeTestComp0905', '0905冒烟测试公司7', '0905测试公司1', '', '', '0905测试公司5', '0905测试公司6', '', '0927smokeTestCompyb0905', '0905测试公司9', '0905测试公司10', '0905测试公司11', '0905测试公司12', '0905测试公司13', '0905测试公司14', '0905测试公司15', '0905测试公司16', '0905测试公司17', '0905测试公司18', '0905测试公司19', '0905测试公司20', '0905测试公司21', '0905测试公司22', '0905测试公司23', '0905测试公司24', '0905测试公司25', '0905测试公司26', '0905测试公司27', '0905测试公司28', '0905测试公司29', '有序1', '有序2', '有序3', '资产负债0914', '', '抵扣认证日期验证0916', 'Aggrid', '0927创建公司测试冒烟', '0927创建公司小规模测试', '123', '7月开始启用', '跨年测试11月启用yb', '启用测试', '测试', 'testyb', '', '', '跨年测试1月启用yb', '', '12月启用跨年测试', '1130', '上海达尔威贸易有限公司', '', '北京第一村', '北京有序科技有限公司', '北京有序云创有限公司8392', '北京有序云创有限公司6993', '北京有序云创有限公司1419', '北京有序云创有限公司3981', '北京有序云创有限公司2157', '北京有序云创有限公司7217', '北京有序云创有限公司3629', '北京有序云创有限公司5837', '北京有序云创有限公司8247', '北京有序云创有限公司7091']
|
||||
创建帐套页面now
|
||||
create_comp_info=> ['创建帐套测试', '北京有序云创有限公司', '2013小企业会计准则', '一般纳税人', '', 8.0, '2018', '8', '2', '金慧', '10000', '123', 'IT、信息、软件、技术服务', '北京市', '市辖区', '海淀区', 'msg_save', 'create_save', '测试创建帐套', '创建成功', '正例']
|
||||
comp_num_loc=> <selenium.webdriver.remote.webelement.WebElement (session="06f1784739b5c21dbe1a5d85a5803386", element="0.45578749189403034-2")>
|
||||
comp_num= 创建帐套测试
|
||||
num=> 创建帐套测试6490
|
||||
month_index=> 7
|
||||
未查到详细信息 填写
|
||||
text=> 未查到详细信息 填写
|
||||
按钮名称: 帐套信息保存
|
||||
按钮名称: 保存创建
|
||||
Traceback (most recent call last):
|
||||
File "/Users/huangcaiyan/work/e2e-test/test_case/external/create_company/create_comp_spec.py", line 48, in test_verify_create_comp
|
||||
new_comp_name_list_len = (compLisPage.get_comp_name_list())
|
||||
File "/Users/huangcaiyan/work/e2e-test/test_case/external/comp_list/comp_list_page.py", line 101, in get_comp_name_list
|
||||
name_loc = tr_locs[ tr_index ].find_element_by_xpath( name_xpath )
|
||||
File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/webelement.py", line 263, in find_element_by_xpath
|
||||
return self.find_element(by=By.XPATH, value=xpath)
|
||||
File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/webelement.py", line 518, in find_element
|
||||
{"using": by, "value": value})['value']
|
||||
File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/webelement.py", line 501, in _execute
|
||||
return self._parent.execute(command, params)
|
||||
File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 308, in execute
|
||||
self.error_handler.check_response(response)
|
||||
File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response
|
||||
raise exception_class(message, screen, stacktrace)
|
||||
selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: element is not attached to the page document
|
||||
(Session info: chrome=63.0.3239.132)
|
||||
(Driver info: chromedriver=2.33.506106 (8a06c39c4582fbfbab6966dbb1c38a9173bfb1a2),platform=Mac OS X 10.11.6 x86_64)
|
||||
|
||||
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
<!--css div popup end-->
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id='total_row'>
|
||||
<td>Total</td>
|
||||
<td>1</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>1</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id='ending'> </div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,469 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>管有账测试报告</title>
|
||||
<meta name="generator" content="HTMLTestRunner 0.8.2"/>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
|
||||
<style type="text/css" media="screen">
|
||||
body { font-family: verdana, arial, helvetica, sans-serif; font-size: 80%; }
|
||||
table { font-size: 100%; }
|
||||
pre { }
|
||||
|
||||
/* -- heading ---------------------------------------------------------------------- */
|
||||
h1 {
|
||||
font-size: 16pt;
|
||||
color: gray;
|
||||
}
|
||||
.heading {
|
||||
margin-top: 0ex;
|
||||
margin-bottom: 1ex;
|
||||
}
|
||||
|
||||
.heading .attribute {
|
||||
margin-top: 1ex;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.heading .description {
|
||||
margin-top: 4ex;
|
||||
margin-bottom: 6ex;
|
||||
}
|
||||
|
||||
/* -- css div popup ------------------------------------------------------------------------ */
|
||||
a.popup_link {
|
||||
}
|
||||
|
||||
a.popup_link:hover {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.popup_window {
|
||||
display: none;
|
||||
position: relative;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
/*border: solid #627173 1px; */
|
||||
padding: 10px;
|
||||
background-color: #E6E6D6;
|
||||
font-family: "Lucida Console", "Courier New", Courier, monospace;
|
||||
text-align: left;
|
||||
font-size: 8pt;
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
}
|
||||
/* -- report ------------------------------------------------------------------------ */
|
||||
#show_detail_line {
|
||||
margin-top: 3ex;
|
||||
margin-bottom: 1ex;
|
||||
}
|
||||
#result_table {
|
||||
width: 80%;
|
||||
border-collapse: collapse;
|
||||
border: 1px solid #777;
|
||||
}
|
||||
#header_row {
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
background-color: #777;
|
||||
}
|
||||
#result_table td {
|
||||
border: 1px solid #777;
|
||||
padding: 2px;
|
||||
}
|
||||
#total_row { font-weight: bold; }
|
||||
.passClass { background-color: #6c6; }
|
||||
.failClass { background-color: #c60; }
|
||||
.errorClass { background-color: #c00; }
|
||||
.passCase { color: #6c6; }
|
||||
.failCase { color: #c60; font-weight: bold; }
|
||||
.errorCase { color: #c00; font-weight: bold; }
|
||||
.hiddenRow { display: none; }
|
||||
.testcase { margin-left: 2em; }
|
||||
|
||||
|
||||
/* -- ending ---------------------------------------------------------------------- */
|
||||
#ending {
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<script language="javascript" type="text/javascript"><!--
|
||||
output_list = Array();
|
||||
|
||||
/* level - 0:Summary; 1:Failed; 2:All */
|
||||
function showCase(level) {
|
||||
trs = document.getElementsByTagName("tr");
|
||||
for (var i = 0; i < trs.length; i++) {
|
||||
tr = trs[i];
|
||||
id = tr.id;
|
||||
if (id.substr(0,2) == 'ft') {
|
||||
if (level < 1) {
|
||||
tr.className = 'hiddenRow';
|
||||
}
|
||||
else {
|
||||
tr.className = '';
|
||||
}
|
||||
}
|
||||
if (id.substr(0,2) == 'pt') {
|
||||
if (level > 1) {
|
||||
tr.className = '';
|
||||
}
|
||||
else {
|
||||
tr.className = 'hiddenRow';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function showClassDetail(cid, count) {
|
||||
var id_list = Array(count);
|
||||
var toHide = 1;
|
||||
for (var i = 0; i < count; i++) {
|
||||
tid0 = 't' + cid.substr(1) + '.' + (i+1);
|
||||
tid = 'f' + tid0;
|
||||
tr = document.getElementById(tid);
|
||||
if (!tr) {
|
||||
tid = 'p' + tid0;
|
||||
tr = document.getElementById(tid);
|
||||
}
|
||||
id_list[i] = tid;
|
||||
if (tr.className) {
|
||||
toHide = 0;
|
||||
}
|
||||
}
|
||||
for (var i = 0; i < count; i++) {
|
||||
tid = id_list[i];
|
||||
if (toHide) {
|
||||
document.getElementById('div_'+tid).style.display = 'none'
|
||||
document.getElementById(tid).className = 'hiddenRow';
|
||||
}
|
||||
else {
|
||||
document.getElementById(tid).className = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function showTestDetail(div_id){
|
||||
var details_div = document.getElementById(div_id)
|
||||
var displayState = details_div.style.display
|
||||
// alert(displayState)
|
||||
if (displayState != 'block' ) {
|
||||
displayState = 'block'
|
||||
details_div.style.display = 'block'
|
||||
}
|
||||
else {
|
||||
details_div.style.display = 'none'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function html_escape(s) {
|
||||
s = s.replace(/&/g,'&');
|
||||
s = s.replace(/</g,'<');
|
||||
s = s.replace(/>/g,'>');
|
||||
return s;
|
||||
}
|
||||
|
||||
/* obsoleted by detail in <div>
|
||||
function showOutput(id, name) {
|
||||
var w = window.open("", //url
|
||||
name,
|
||||
"resizable,scrollbars,status,width=800,height=450");
|
||||
d = w.document;
|
||||
d.write("<pre>");
|
||||
d.write(html_escape(output_list[id]));
|
||||
d.write("\n");
|
||||
d.write("<a href='javascript:window.close()'>close</a>\n");
|
||||
d.write("</pre>\n");
|
||||
d.close();
|
||||
}
|
||||
*/
|
||||
--></script>
|
||||
|
||||
<div class='heading'>
|
||||
<h1>管有账测试报告</h1>
|
||||
<p class='attribute'><strong>Start Time:</strong> 2018-02-01 17:19:23</p>
|
||||
<p class='attribute'><strong>Duration:</strong> 0:00:45.265812</p>
|
||||
<p class='attribute'><strong>Status:</strong> Error 1</p>
|
||||
|
||||
<p class='description'>测试用例执行情况:</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<p id='show_detail_line'>Show
|
||||
<a href='javascript:showCase(0)'>Summary</a>
|
||||
<a href='javascript:showCase(1)'>Failed</a>
|
||||
<a href='javascript:showCase(2)'>All</a>
|
||||
</p>
|
||||
<table id='result_table'>
|
||||
<colgroup>
|
||||
<col align='left' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
</colgroup>
|
||||
<tr id='header_row'>
|
||||
<td>Test Group/Test case</td>
|
||||
<td>Count</td>
|
||||
<td>Pass</td>
|
||||
<td>Fail</td>
|
||||
<td>Error</td>
|
||||
<td>View</td>
|
||||
</tr>
|
||||
|
||||
<tr class='errorClass'>
|
||||
<td>test_case.external.create_company.create_comp_spec.CreateCompSpec</td>
|
||||
<td>1</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>1</td>
|
||||
<td><a href="javascript:showClassDetail('c1',1)">Detail</a></td>
|
||||
</tr>
|
||||
|
||||
<tr id='ft1.1' class='none'>
|
||||
<td class='errorCase'><div class='testcase'>test_verify_create_comp: 确认创建帐套功能,创建成功</div></td>
|
||||
<td colspan='5' align='center'>
|
||||
|
||||
<!--css div popup start-->
|
||||
<a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_ft1.1')" >
|
||||
error</a>
|
||||
|
||||
<div id='div_ft1.1' class="popup_window">
|
||||
<div style='text-align: right; color:red;cursor:pointer'>
|
||||
<a onfocus='this.blur();' onclick="document.getElementById('div_ft1.1').style.display = 'none' " >
|
||||
[x]</a>
|
||||
</div>
|
||||
<pre>
|
||||
|
||||
ft1.1: 固定yk
|
||||
公司0714-2
|
||||
|
||||
|
||||
固定资产(最后一期折旧测试)
|
||||
公司0719-1
|
||||
公司0719-2
|
||||
公司0719-3
|
||||
|
||||
gd
|
||||
autotestyb
|
||||
0824大数据测试
|
||||
yiban有序(勿动)
|
||||
21221
|
||||
哈哈哈
|
||||
张宇迪
|
||||
1q1q
|
||||
期初-一般test
|
||||
LCK-YB
|
||||
小规模dddd
|
||||
yiban0804
|
||||
0810yiban冒烟测试
|
||||
0810yiban测试(勿动)
|
||||
|
||||
0927smokeTestComp0905
|
||||
0905冒烟测试公司7
|
||||
0905测试公司1
|
||||
|
||||
|
||||
0905测试公司5
|
||||
0905测试公司6
|
||||
|
||||
0927smokeTestCompyb0905
|
||||
0905测试公司9
|
||||
0905测试公司10
|
||||
0905测试公司11
|
||||
0905测试公司12
|
||||
0905测试公司13
|
||||
0905测试公司14
|
||||
0905测试公司15
|
||||
0905测试公司16
|
||||
0905测试公司17
|
||||
0905测试公司18
|
||||
0905测试公司19
|
||||
0905测试公司20
|
||||
0905测试公司21
|
||||
0905测试公司22
|
||||
0905测试公司23
|
||||
0905测试公司24
|
||||
0905测试公司25
|
||||
0905测试公司26
|
||||
0905测试公司27
|
||||
0905测试公司28
|
||||
0905测试公司29
|
||||
有序1
|
||||
有序2
|
||||
有序3
|
||||
资产负债0914
|
||||
|
||||
抵扣认证日期验证0916
|
||||
Aggrid
|
||||
0927创建公司测试冒烟
|
||||
0927创建公司小规模测试
|
||||
123
|
||||
7月开始启用
|
||||
跨年测试11月启用yb
|
||||
启用测试
|
||||
测试
|
||||
testyb
|
||||
|
||||
|
||||
跨年测试1月启用yb
|
||||
|
||||
12月启用跨年测试
|
||||
1130
|
||||
上海达尔威贸易有限公司
|
||||
|
||||
北京第一村
|
||||
北京有序科技有限公司
|
||||
北京有序云创有限公司8392
|
||||
北京有序云创有限公司6993
|
||||
北京有序云创有限公司1419
|
||||
北京有序云创有限公司3981
|
||||
北京有序云创有限公司2157
|
||||
北京有序云创有限公司7217
|
||||
北京有序云创有限公司3629
|
||||
北京有序云创有限公司5837
|
||||
北京有序云创有限公司8247
|
||||
北京有序云创有限公司7091
|
||||
北京有序云创有限公司8180
|
||||
comp_name_list= ['固定yk', '公司0714-2', '', '', '固定资产(最后一期折旧测试)', '公司0719-1', '公司0719-2', '公司0719-3', '', 'gd', 'autotestyb', '0824大数据测试', 'yiban有序(勿动)', '21221', '哈哈哈', '张宇迪', '1q1q', '期初-一般test', 'LCK-YB', '小规模dddd', 'yiban0804', '0810yiban冒烟测试', '0810yiban测试(勿动)', '', '0927smokeTestComp0905', '0905冒烟测试公司7', '0905测试公司1', '', '', '0905测试公司5', '0905测试公司6', '', '0927smokeTestCompyb0905', '0905测试公司9', '0905测试公司10', '0905测试公司11', '0905测试公司12', '0905测试公司13', '0905测试公司14', '0905测试公司15', '0905测试公司16', '0905测试公司17', '0905测试公司18', '0905测试公司19', '0905测试公司20', '0905测试公司21', '0905测试公司22', '0905测试公司23', '0905测试公司24', '0905测试公司25', '0905测试公司26', '0905测试公司27', '0905测试公司28', '0905测试公司29', '有序1', '有序2', '有序3', '资产负债0914', '', '抵扣认证日期验证0916', 'Aggrid', '0927创建公司测试冒烟', '0927创建公司小规模测试', '123', '7月开始启用', '跨年测试11月启用yb', '启用测试', '测试', 'testyb', '', '', '跨年测试1月启用yb', '', '12月启用跨年测试', '1130', '上海达尔威贸易有限公司', '', '北京第一村', '北京有序科技有限公司', '北京有序云创有限公司8392', '北京有序云创有限公司6993', '北京有序云创有限公司1419', '北京有序云创有限公司3981', '北京有序云创有限公司2157', '北京有序云创有限公司7217', '北京有序云创有限公司3629', '北京有序云创有限公司5837', '北京有序云创有限公司8247', '北京有序云创有限公司7091', '北京有序云创有限公司8180']
|
||||
创建帐套页面now
|
||||
create_comp_info=> ['创建帐套测试', '北京有序云创有限公司', '2013小企业会计准则', '一般纳税人', '', 8.0, '2018', '8', '2', '金慧', '10000', '123', 'IT、信息、软件、技术服务', '北京市', '市辖区', '海淀区', 'msg_save', 'create_save', '测试创建帐套', '创建成功', '正例']
|
||||
comp_num_loc=> <selenium.webdriver.remote.webelement.WebElement (session="1982e23b1933ff0796111d46d34dbfcc", element="0.7623872441443311-2")>
|
||||
comp_num= 创建帐套测试
|
||||
num=> 创建帐套测试1477
|
||||
month_index=> 7
|
||||
未查到详细信息 填写
|
||||
text=> 未查到详细信息 填写
|
||||
按钮名称: 帐套信息保存
|
||||
按钮名称: 保存创建
|
||||
固定yk
|
||||
公司0714-2
|
||||
|
||||
|
||||
固定资产(最后一期折旧测试)
|
||||
公司0719-1
|
||||
公司0719-2
|
||||
公司0719-3
|
||||
|
||||
gd
|
||||
autotestyb
|
||||
0824大数据测试
|
||||
yiban有序(勿动)
|
||||
21221
|
||||
哈哈哈
|
||||
张宇迪
|
||||
1q1q
|
||||
期初-一般test
|
||||
LCK-YB
|
||||
小规模dddd
|
||||
yiban0804
|
||||
0810yiban冒烟测试
|
||||
0810yiban测试(勿动)
|
||||
|
||||
0927smokeTestComp0905
|
||||
0905冒烟测试公司7
|
||||
0905测试公司1
|
||||
|
||||
|
||||
0905测试公司5
|
||||
0905测试公司6
|
||||
|
||||
0927smokeTestCompyb0905
|
||||
0905测试公司9
|
||||
0905测试公司10
|
||||
0905测试公司11
|
||||
0905测试公司12
|
||||
0905测试公司13
|
||||
0905测试公司14
|
||||
0905测试公司15
|
||||
0905测试公司16
|
||||
0905测试公司17
|
||||
0905测试公司18
|
||||
0905测试公司19
|
||||
0905测试公司20
|
||||
0905测试公司21
|
||||
0905测试公司22
|
||||
0905测试公司23
|
||||
0905测试公司24
|
||||
0905测试公司25
|
||||
0905测试公司26
|
||||
0905测试公司27
|
||||
0905测试公司28
|
||||
0905测试公司29
|
||||
有序1
|
||||
有序2
|
||||
有序3
|
||||
资产负债0914
|
||||
|
||||
抵扣认证日期验证0916
|
||||
Aggrid
|
||||
0927创建公司测试冒烟
|
||||
0927创建公司小规模测试
|
||||
123
|
||||
7月开始启用
|
||||
跨年测试11月启用yb
|
||||
启用测试
|
||||
测试
|
||||
testyb
|
||||
|
||||
|
||||
跨年测试1月启用yb
|
||||
|
||||
12月启用跨年测试
|
||||
1130
|
||||
上海达尔威贸易有限公司
|
||||
|
||||
北京第一村
|
||||
北京有序科技有限公司
|
||||
北京有序云创有限公司8392
|
||||
北京有序云创有限公司6993
|
||||
北京有序云创有限公司1419
|
||||
北京有序云创有限公司3981
|
||||
北京有序云创有限公司2157
|
||||
北京有序云创有限公司7217
|
||||
北京有序云创有限公司3629
|
||||
北京有序云创有限公司5837
|
||||
北京有序云创有限公司8247
|
||||
北京有序云创有限公司7091
|
||||
北京有序云创有限公司8180
|
||||
北京有序云创有限公司5484
|
||||
comp_name_list= ['固定yk', '公司0714-2', '', '', '固定资产(最后一期折旧测试)', '公司0719-1', '公司0719-2', '公司0719-3', '', 'gd', 'autotestyb', '0824大数据测试', 'yiban有序(勿动)', '21221', '哈哈哈', '张宇迪', '1q1q', '期初-一般test', 'LCK-YB', '小规模dddd', 'yiban0804', '0810yiban冒烟测试', '0810yiban测试(勿动)', '', '0927smokeTestComp0905', '0905冒烟测试公司7', '0905测试公司1', '', '', '0905测试公司5', '0905测试公司6', '', '0927smokeTestCompyb0905', '0905测试公司9', '0905测试公司10', '0905测试公司11', '0905测试公司12', '0905测试公司13', '0905测试公司14', '0905测试公司15', '0905测试公司16', '0905测试公司17', '0905测试公司18', '0905测试公司19', '0905测试公司20', '0905测试公司21', '0905测试公司22', '0905测试公司23', '0905测试公司24', '0905测试公司25', '0905测试公司26', '0905测试公司27', '0905测试公司28', '0905测试公司29', '有序1', '有序2', '有序3', '资产负债0914', '', '抵扣认证日期验证0916', 'Aggrid', '0927创建公司测试冒烟', '0927创建公司小规模测试', '123', '7月开始启用', '跨年测试11月启用yb', '启用测试', '测试', 'testyb', '', '', '跨年测试1月启用yb', '', '12月启用跨年测试', '1130', '上海达尔威贸易有限公司', '', '北京第一村', '北京有序科技有限公司', '北京有序云创有限公司8392', '北京有序云创有限公司6993', '北京有序云创有限公司1419', '北京有序云创有限公司3981', '北京有序云创有限公司2157', '北京有序云创有限公司7217', '北京有序云创有限公司3629', '北京有序云创有限公司5837', '北京有序云创有限公司8247', '北京有序云创有限公司7091', '北京有序云创有限公司8180', '北京有序云创有限公司5484']
|
||||
Traceback (most recent call last):
|
||||
File "/Users/huangcaiyan/work/e2e-test/test_case/external/create_company/create_comp_spec.py", line 50, in test_verify_create_comp
|
||||
self.assertIn( comp_name_list_len + 1 , new_comp_name_list_len )
|
||||
File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/unittest/case.py", line 1085, in assertIn
|
||||
if member not in container:
|
||||
TypeError: argument of type 'int' is not iterable
|
||||
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
<!--css div popup end-->
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id='total_row'>
|
||||
<td>Total</td>
|
||||
<td>1</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>1</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id='ending'> </div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,471 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>管有账测试报告</title>
|
||||
<meta name="generator" content="HTMLTestRunner 0.8.2"/>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
|
||||
<style type="text/css" media="screen">
|
||||
body { font-family: verdana, arial, helvetica, sans-serif; font-size: 80%; }
|
||||
table { font-size: 100%; }
|
||||
pre { }
|
||||
|
||||
/* -- heading ---------------------------------------------------------------------- */
|
||||
h1 {
|
||||
font-size: 16pt;
|
||||
color: gray;
|
||||
}
|
||||
.heading {
|
||||
margin-top: 0ex;
|
||||
margin-bottom: 1ex;
|
||||
}
|
||||
|
||||
.heading .attribute {
|
||||
margin-top: 1ex;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.heading .description {
|
||||
margin-top: 4ex;
|
||||
margin-bottom: 6ex;
|
||||
}
|
||||
|
||||
/* -- css div popup ------------------------------------------------------------------------ */
|
||||
a.popup_link {
|
||||
}
|
||||
|
||||
a.popup_link:hover {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.popup_window {
|
||||
display: none;
|
||||
position: relative;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
/*border: solid #627173 1px; */
|
||||
padding: 10px;
|
||||
background-color: #E6E6D6;
|
||||
font-family: "Lucida Console", "Courier New", Courier, monospace;
|
||||
text-align: left;
|
||||
font-size: 8pt;
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
}
|
||||
/* -- report ------------------------------------------------------------------------ */
|
||||
#show_detail_line {
|
||||
margin-top: 3ex;
|
||||
margin-bottom: 1ex;
|
||||
}
|
||||
#result_table {
|
||||
width: 80%;
|
||||
border-collapse: collapse;
|
||||
border: 1px solid #777;
|
||||
}
|
||||
#header_row {
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
background-color: #777;
|
||||
}
|
||||
#result_table td {
|
||||
border: 1px solid #777;
|
||||
padding: 2px;
|
||||
}
|
||||
#total_row { font-weight: bold; }
|
||||
.passClass { background-color: #6c6; }
|
||||
.failClass { background-color: #c60; }
|
||||
.errorClass { background-color: #c00; }
|
||||
.passCase { color: #6c6; }
|
||||
.failCase { color: #c60; font-weight: bold; }
|
||||
.errorCase { color: #c00; font-weight: bold; }
|
||||
.hiddenRow { display: none; }
|
||||
.testcase { margin-left: 2em; }
|
||||
|
||||
|
||||
/* -- ending ---------------------------------------------------------------------- */
|
||||
#ending {
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<script language="javascript" type="text/javascript"><!--
|
||||
output_list = Array();
|
||||
|
||||
/* level - 0:Summary; 1:Failed; 2:All */
|
||||
function showCase(level) {
|
||||
trs = document.getElementsByTagName("tr");
|
||||
for (var i = 0; i < trs.length; i++) {
|
||||
tr = trs[i];
|
||||
id = tr.id;
|
||||
if (id.substr(0,2) == 'ft') {
|
||||
if (level < 1) {
|
||||
tr.className = 'hiddenRow';
|
||||
}
|
||||
else {
|
||||
tr.className = '';
|
||||
}
|
||||
}
|
||||
if (id.substr(0,2) == 'pt') {
|
||||
if (level > 1) {
|
||||
tr.className = '';
|
||||
}
|
||||
else {
|
||||
tr.className = 'hiddenRow';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function showClassDetail(cid, count) {
|
||||
var id_list = Array(count);
|
||||
var toHide = 1;
|
||||
for (var i = 0; i < count; i++) {
|
||||
tid0 = 't' + cid.substr(1) + '.' + (i+1);
|
||||
tid = 'f' + tid0;
|
||||
tr = document.getElementById(tid);
|
||||
if (!tr) {
|
||||
tid = 'p' + tid0;
|
||||
tr = document.getElementById(tid);
|
||||
}
|
||||
id_list[i] = tid;
|
||||
if (tr.className) {
|
||||
toHide = 0;
|
||||
}
|
||||
}
|
||||
for (var i = 0; i < count; i++) {
|
||||
tid = id_list[i];
|
||||
if (toHide) {
|
||||
document.getElementById('div_'+tid).style.display = 'none'
|
||||
document.getElementById(tid).className = 'hiddenRow';
|
||||
}
|
||||
else {
|
||||
document.getElementById(tid).className = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function showTestDetail(div_id){
|
||||
var details_div = document.getElementById(div_id)
|
||||
var displayState = details_div.style.display
|
||||
// alert(displayState)
|
||||
if (displayState != 'block' ) {
|
||||
displayState = 'block'
|
||||
details_div.style.display = 'block'
|
||||
}
|
||||
else {
|
||||
details_div.style.display = 'none'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function html_escape(s) {
|
||||
s = s.replace(/&/g,'&');
|
||||
s = s.replace(/</g,'<');
|
||||
s = s.replace(/>/g,'>');
|
||||
return s;
|
||||
}
|
||||
|
||||
/* obsoleted by detail in <div>
|
||||
function showOutput(id, name) {
|
||||
var w = window.open("", //url
|
||||
name,
|
||||
"resizable,scrollbars,status,width=800,height=450");
|
||||
d = w.document;
|
||||
d.write("<pre>");
|
||||
d.write(html_escape(output_list[id]));
|
||||
d.write("\n");
|
||||
d.write("<a href='javascript:window.close()'>close</a>\n");
|
||||
d.write("</pre>\n");
|
||||
d.close();
|
||||
}
|
||||
*/
|
||||
--></script>
|
||||
|
||||
<div class='heading'>
|
||||
<h1>管有账测试报告</h1>
|
||||
<p class='attribute'><strong>Start Time:</strong> 2018-02-01 17:25:29</p>
|
||||
<p class='attribute'><strong>Duration:</strong> 0:00:43.522151</p>
|
||||
<p class='attribute'><strong>Status:</strong> Error 1</p>
|
||||
|
||||
<p class='description'>测试用例执行情况:</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<p id='show_detail_line'>Show
|
||||
<a href='javascript:showCase(0)'>Summary</a>
|
||||
<a href='javascript:showCase(1)'>Failed</a>
|
||||
<a href='javascript:showCase(2)'>All</a>
|
||||
</p>
|
||||
<table id='result_table'>
|
||||
<colgroup>
|
||||
<col align='left' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
</colgroup>
|
||||
<tr id='header_row'>
|
||||
<td>Test Group/Test case</td>
|
||||
<td>Count</td>
|
||||
<td>Pass</td>
|
||||
<td>Fail</td>
|
||||
<td>Error</td>
|
||||
<td>View</td>
|
||||
</tr>
|
||||
|
||||
<tr class='errorClass'>
|
||||
<td>test_case.external.create_company.create_comp_spec.CreateCompSpec</td>
|
||||
<td>1</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>1</td>
|
||||
<td><a href="javascript:showClassDetail('c1',1)">Detail</a></td>
|
||||
</tr>
|
||||
|
||||
<tr id='ft1.1' class='none'>
|
||||
<td class='errorCase'><div class='testcase'>test_verify_create_comp: 确认创建帐套功能,创建成功</div></td>
|
||||
<td colspan='5' align='center'>
|
||||
|
||||
<!--css div popup start-->
|
||||
<a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_ft1.1')" >
|
||||
error</a>
|
||||
|
||||
<div id='div_ft1.1' class="popup_window">
|
||||
<div style='text-align: right; color:red;cursor:pointer'>
|
||||
<a onfocus='this.blur();' onclick="document.getElementById('div_ft1.1').style.display = 'none' " >
|
||||
[x]</a>
|
||||
</div>
|
||||
<pre>
|
||||
|
||||
ft1.1: 固定yk
|
||||
公司0714-2
|
||||
|
||||
|
||||
固定资产(最后一期折旧测试)
|
||||
公司0719-1
|
||||
公司0719-2
|
||||
公司0719-3
|
||||
|
||||
gd
|
||||
autotestyb
|
||||
0824大数据测试
|
||||
yiban有序(勿动)
|
||||
21221
|
||||
哈哈哈
|
||||
张宇迪
|
||||
1q1q
|
||||
期初-一般test
|
||||
LCK-YB
|
||||
小规模dddd
|
||||
yiban0804
|
||||
0810yiban冒烟测试
|
||||
0810yiban测试(勿动)
|
||||
|
||||
0927smokeTestComp0905
|
||||
0905冒烟测试公司7
|
||||
0905测试公司1
|
||||
|
||||
|
||||
0905测试公司5
|
||||
0905测试公司6
|
||||
|
||||
0927smokeTestCompyb0905
|
||||
0905测试公司9
|
||||
0905测试公司10
|
||||
0905测试公司11
|
||||
0905测试公司12
|
||||
0905测试公司13
|
||||
0905测试公司14
|
||||
0905测试公司15
|
||||
0905测试公司16
|
||||
0905测试公司17
|
||||
0905测试公司18
|
||||
0905测试公司19
|
||||
0905测试公司20
|
||||
0905测试公司21
|
||||
0905测试公司22
|
||||
0905测试公司23
|
||||
0905测试公司24
|
||||
0905测试公司25
|
||||
0905测试公司26
|
||||
0905测试公司27
|
||||
0905测试公司28
|
||||
0905测试公司29
|
||||
有序1
|
||||
有序2
|
||||
有序3
|
||||
资产负债0914
|
||||
|
||||
抵扣认证日期验证0916
|
||||
Aggrid
|
||||
0927创建公司测试冒烟
|
||||
0927创建公司小规模测试
|
||||
123
|
||||
7月开始启用
|
||||
跨年测试11月启用yb
|
||||
启用测试
|
||||
测试
|
||||
testyb
|
||||
|
||||
|
||||
跨年测试1月启用yb
|
||||
|
||||
12月启用跨年测试
|
||||
1130
|
||||
上海达尔威贸易有限公司
|
||||
|
||||
北京第一村
|
||||
北京有序科技有限公司
|
||||
北京有序云创有限公司8392
|
||||
北京有序云创有限公司6993
|
||||
北京有序云创有限公司1419
|
||||
北京有序云创有限公司3981
|
||||
北京有序云创有限公司2157
|
||||
北京有序云创有限公司7217
|
||||
北京有序云创有限公司3629
|
||||
北京有序云创有限公司5837
|
||||
北京有序云创有限公司8247
|
||||
北京有序云创有限公司7091
|
||||
北京有序云创有限公司8180
|
||||
北京有序云创有限公司5484
|
||||
comp_name_list= ['固定yk', '公司0714-2', '', '', '固定资产(最后一期折旧测试)', '公司0719-1', '公司0719-2', '公司0719-3', '', 'gd', 'autotestyb', '0824大数据测试', 'yiban有序(勿动)', '21221', '哈哈哈', '张宇迪', '1q1q', '期初-一般test', 'LCK-YB', '小规模dddd', 'yiban0804', '0810yiban冒烟测试', '0810yiban测试(勿动)', '', '0927smokeTestComp0905', '0905冒烟测试公司7', '0905测试公司1', '', '', '0905测试公司5', '0905测试公司6', '', '0927smokeTestCompyb0905', '0905测试公司9', '0905测试公司10', '0905测试公司11', '0905测试公司12', '0905测试公司13', '0905测试公司14', '0905测试公司15', '0905测试公司16', '0905测试公司17', '0905测试公司18', '0905测试公司19', '0905测试公司20', '0905测试公司21', '0905测试公司22', '0905测试公司23', '0905测试公司24', '0905测试公司25', '0905测试公司26', '0905测试公司27', '0905测试公司28', '0905测试公司29', '有序1', '有序2', '有序3', '资产负债0914', '', '抵扣认证日期验证0916', 'Aggrid', '0927创建公司测试冒烟', '0927创建公司小规模测试', '123', '7月开始启用', '跨年测试11月启用yb', '启用测试', '测试', 'testyb', '', '', '跨年测试1月启用yb', '', '12月启用跨年测试', '1130', '上海达尔威贸易有限公司', '', '北京第一村', '北京有序科技有限公司', '北京有序云创有限公司8392', '北京有序云创有限公司6993', '北京有序云创有限公司1419', '北京有序云创有限公司3981', '北京有序云创有限公司2157', '北京有序云创有限公司7217', '北京有序云创有限公司3629', '北京有序云创有限公司5837', '北京有序云创有限公司8247', '北京有序云创有限公司7091', '北京有序云创有限公司8180', '北京有序云创有限公司5484']
|
||||
创建帐套页面now
|
||||
create_comp_info=> ['创建帐套测试', '北京有序云创有限公司', '2013小企业会计准则', '一般纳税人', '', 8.0, '2018', '8', '2', '金慧', '10000', '123', 'IT、信息、软件、技术服务', '北京市', '市辖区', '海淀区', 'msg_save', 'create_save', '测试创建帐套', '创建成功', '正例']
|
||||
comp_num_loc=> <selenium.webdriver.remote.webelement.WebElement (session="3b8b537567413080b4d541a3a4e776d6", element="0.39534547713910917-2")>
|
||||
comp_num= 创建帐套测试
|
||||
num=> 创建帐套测试8415
|
||||
month_index=> 7
|
||||
未查到详细信息 填写
|
||||
text=> 未查到详细信息 填写
|
||||
按钮名称: 帐套信息保存
|
||||
按钮名称: 保存创建
|
||||
固定yk
|
||||
公司0714-2
|
||||
|
||||
|
||||
固定资产(最后一期折旧测试)
|
||||
公司0719-1
|
||||
公司0719-2
|
||||
公司0719-3
|
||||
|
||||
gd
|
||||
autotestyb
|
||||
0824大数据测试
|
||||
yiban有序(勿动)
|
||||
21221
|
||||
哈哈哈
|
||||
张宇迪
|
||||
1q1q
|
||||
期初-一般test
|
||||
LCK-YB
|
||||
小规模dddd
|
||||
yiban0804
|
||||
0810yiban冒烟测试
|
||||
0810yiban测试(勿动)
|
||||
|
||||
0927smokeTestComp0905
|
||||
0905冒烟测试公司7
|
||||
0905测试公司1
|
||||
|
||||
|
||||
0905测试公司5
|
||||
0905测试公司6
|
||||
|
||||
0927smokeTestCompyb0905
|
||||
0905测试公司9
|
||||
0905测试公司10
|
||||
0905测试公司11
|
||||
0905测试公司12
|
||||
0905测试公司13
|
||||
0905测试公司14
|
||||
0905测试公司15
|
||||
0905测试公司16
|
||||
0905测试公司17
|
||||
0905测试公司18
|
||||
0905测试公司19
|
||||
0905测试公司20
|
||||
0905测试公司21
|
||||
0905测试公司22
|
||||
0905测试公司23
|
||||
0905测试公司24
|
||||
0905测试公司25
|
||||
0905测试公司26
|
||||
0905测试公司27
|
||||
0905测试公司28
|
||||
0905测试公司29
|
||||
有序1
|
||||
有序2
|
||||
有序3
|
||||
资产负债0914
|
||||
|
||||
抵扣认证日期验证0916
|
||||
Aggrid
|
||||
0927创建公司测试冒烟
|
||||
0927创建公司小规模测试
|
||||
123
|
||||
7月开始启用
|
||||
跨年测试11月启用yb
|
||||
启用测试
|
||||
测试
|
||||
testyb
|
||||
|
||||
|
||||
跨年测试1月启用yb
|
||||
|
||||
12月启用跨年测试
|
||||
1130
|
||||
上海达尔威贸易有限公司
|
||||
|
||||
北京第一村
|
||||
北京有序科技有限公司
|
||||
北京有序云创有限公司8392
|
||||
北京有序云创有限公司6993
|
||||
北京有序云创有限公司1419
|
||||
北京有序云创有限公司3981
|
||||
北京有序云创有限公司2157
|
||||
北京有序云创有限公司7217
|
||||
北京有序云创有限公司3629
|
||||
北京有序云创有限公司5837
|
||||
北京有序云创有限公司8247
|
||||
北京有序云创有限公司7091
|
||||
北京有序云创有限公司8180
|
||||
北京有序云创有限公司5484
|
||||
北京有序云创有限公司6301
|
||||
comp_name_list= ['固定yk', '公司0714-2', '', '', '固定资产(最后一期折旧测试)', '公司0719-1', '公司0719-2', '公司0719-3', '', 'gd', 'autotestyb', '0824大数据测试', 'yiban有序(勿动)', '21221', '哈哈哈', '张宇迪', '1q1q', '期初-一般test', 'LCK-YB', '小规模dddd', 'yiban0804', '0810yiban冒烟测试', '0810yiban测试(勿动)', '', '0927smokeTestComp0905', '0905冒烟测试公司7', '0905测试公司1', '', '', '0905测试公司5', '0905测试公司6', '', '0927smokeTestCompyb0905', '0905测试公司9', '0905测试公司10', '0905测试公司11', '0905测试公司12', '0905测试公司13', '0905测试公司14', '0905测试公司15', '0905测试公司16', '0905测试公司17', '0905测试公司18', '0905测试公司19', '0905测试公司20', '0905测试公司21', '0905测试公司22', '0905测试公司23', '0905测试公司24', '0905测试公司25', '0905测试公司26', '0905测试公司27', '0905测试公司28', '0905测试公司29', '有序1', '有序2', '有序3', '资产负债0914', '', '抵扣认证日期验证0916', 'Aggrid', '0927创建公司测试冒烟', '0927创建公司小规模测试', '123', '7月开始启用', '跨年测试11月启用yb', '启用测试', '测试', 'testyb', '', '', '跨年测试1月启用yb', '', '12月启用跨年测试', '1130', '上海达尔威贸易有限公司', '', '北京第一村', '北京有序科技有限公司', '北京有序云创有限公司8392', '北京有序云创有限公司6993', '北京有序云创有限公司1419', '北京有序云创有限公司3981', '北京有序云创有限公司2157', '北京有序云创有限公司7217', '北京有序云创有限公司3629', '北京有序云创有限公司5837', '北京有序云创有限公司8247', '北京有序云创有限公司7091', '北京有序云创有限公司8180', '北京有序云创有限公司5484', '北京有序云创有限公司6301']
|
||||
Traceback (most recent call last):
|
||||
File "/Users/huangcaiyan/work/e2e-test/test_case/external/create_company/create_comp_spec.py", line 50, in test_verify_create_comp
|
||||
self.assertIn( int( comp_name_list_len ) + 1 , new_comp_name_list_len )
|
||||
File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/unittest/case.py", line 1085, in assertIn
|
||||
if member not in container:
|
||||
TypeError: argument of type 'int' is not iterable
|
||||
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
<!--css div popup end-->
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id='total_row'>
|
||||
<td>Total</td>
|
||||
<td>1</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>1</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id='ending'> </div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,467 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>管有账测试报告</title>
|
||||
<meta name="generator" content="HTMLTestRunner 0.8.2"/>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
|
||||
<style type="text/css" media="screen">
|
||||
body { font-family: verdana, arial, helvetica, sans-serif; font-size: 80%; }
|
||||
table { font-size: 100%; }
|
||||
pre { }
|
||||
|
||||
/* -- heading ---------------------------------------------------------------------- */
|
||||
h1 {
|
||||
font-size: 16pt;
|
||||
color: gray;
|
||||
}
|
||||
.heading {
|
||||
margin-top: 0ex;
|
||||
margin-bottom: 1ex;
|
||||
}
|
||||
|
||||
.heading .attribute {
|
||||
margin-top: 1ex;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.heading .description {
|
||||
margin-top: 4ex;
|
||||
margin-bottom: 6ex;
|
||||
}
|
||||
|
||||
/* -- css div popup ------------------------------------------------------------------------ */
|
||||
a.popup_link {
|
||||
}
|
||||
|
||||
a.popup_link:hover {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.popup_window {
|
||||
display: none;
|
||||
position: relative;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
/*border: solid #627173 1px; */
|
||||
padding: 10px;
|
||||
background-color: #E6E6D6;
|
||||
font-family: "Lucida Console", "Courier New", Courier, monospace;
|
||||
text-align: left;
|
||||
font-size: 8pt;
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
}
|
||||
/* -- report ------------------------------------------------------------------------ */
|
||||
#show_detail_line {
|
||||
margin-top: 3ex;
|
||||
margin-bottom: 1ex;
|
||||
}
|
||||
#result_table {
|
||||
width: 80%;
|
||||
border-collapse: collapse;
|
||||
border: 1px solid #777;
|
||||
}
|
||||
#header_row {
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
background-color: #777;
|
||||
}
|
||||
#result_table td {
|
||||
border: 1px solid #777;
|
||||
padding: 2px;
|
||||
}
|
||||
#total_row { font-weight: bold; }
|
||||
.passClass { background-color: #6c6; }
|
||||
.failClass { background-color: #c60; }
|
||||
.errorClass { background-color: #c00; }
|
||||
.passCase { color: #6c6; }
|
||||
.failCase { color: #c60; font-weight: bold; }
|
||||
.errorCase { color: #c00; font-weight: bold; }
|
||||
.hiddenRow { display: none; }
|
||||
.testcase { margin-left: 2em; }
|
||||
|
||||
|
||||
/* -- ending ---------------------------------------------------------------------- */
|
||||
#ending {
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<script language="javascript" type="text/javascript"><!--
|
||||
output_list = Array();
|
||||
|
||||
/* level - 0:Summary; 1:Failed; 2:All */
|
||||
function showCase(level) {
|
||||
trs = document.getElementsByTagName("tr");
|
||||
for (var i = 0; i < trs.length; i++) {
|
||||
tr = trs[i];
|
||||
id = tr.id;
|
||||
if (id.substr(0,2) == 'ft') {
|
||||
if (level < 1) {
|
||||
tr.className = 'hiddenRow';
|
||||
}
|
||||
else {
|
||||
tr.className = '';
|
||||
}
|
||||
}
|
||||
if (id.substr(0,2) == 'pt') {
|
||||
if (level > 1) {
|
||||
tr.className = '';
|
||||
}
|
||||
else {
|
||||
tr.className = 'hiddenRow';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function showClassDetail(cid, count) {
|
||||
var id_list = Array(count);
|
||||
var toHide = 1;
|
||||
for (var i = 0; i < count; i++) {
|
||||
tid0 = 't' + cid.substr(1) + '.' + (i+1);
|
||||
tid = 'f' + tid0;
|
||||
tr = document.getElementById(tid);
|
||||
if (!tr) {
|
||||
tid = 'p' + tid0;
|
||||
tr = document.getElementById(tid);
|
||||
}
|
||||
id_list[i] = tid;
|
||||
if (tr.className) {
|
||||
toHide = 0;
|
||||
}
|
||||
}
|
||||
for (var i = 0; i < count; i++) {
|
||||
tid = id_list[i];
|
||||
if (toHide) {
|
||||
document.getElementById('div_'+tid).style.display = 'none'
|
||||
document.getElementById(tid).className = 'hiddenRow';
|
||||
}
|
||||
else {
|
||||
document.getElementById(tid).className = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function showTestDetail(div_id){
|
||||
var details_div = document.getElementById(div_id)
|
||||
var displayState = details_div.style.display
|
||||
// alert(displayState)
|
||||
if (displayState != 'block' ) {
|
||||
displayState = 'block'
|
||||
details_div.style.display = 'block'
|
||||
}
|
||||
else {
|
||||
details_div.style.display = 'none'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function html_escape(s) {
|
||||
s = s.replace(/&/g,'&');
|
||||
s = s.replace(/</g,'<');
|
||||
s = s.replace(/>/g,'>');
|
||||
return s;
|
||||
}
|
||||
|
||||
/* obsoleted by detail in <div>
|
||||
function showOutput(id, name) {
|
||||
var w = window.open("", //url
|
||||
name,
|
||||
"resizable,scrollbars,status,width=800,height=450");
|
||||
d = w.document;
|
||||
d.write("<pre>");
|
||||
d.write(html_escape(output_list[id]));
|
||||
d.write("\n");
|
||||
d.write("<a href='javascript:window.close()'>close</a>\n");
|
||||
d.write("</pre>\n");
|
||||
d.close();
|
||||
}
|
||||
*/
|
||||
--></script>
|
||||
|
||||
<div class='heading'>
|
||||
<h1>管有账测试报告</h1>
|
||||
<p class='attribute'><strong>Start Time:</strong> 2018-02-01 17:26:52</p>
|
||||
<p class='attribute'><strong>Duration:</strong> 0:00:46.017070</p>
|
||||
<p class='attribute'><strong>Status:</strong> Pass 1</p>
|
||||
|
||||
<p class='description'>测试用例执行情况:</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<p id='show_detail_line'>Show
|
||||
<a href='javascript:showCase(0)'>Summary</a>
|
||||
<a href='javascript:showCase(1)'>Failed</a>
|
||||
<a href='javascript:showCase(2)'>All</a>
|
||||
</p>
|
||||
<table id='result_table'>
|
||||
<colgroup>
|
||||
<col align='left' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
</colgroup>
|
||||
<tr id='header_row'>
|
||||
<td>Test Group/Test case</td>
|
||||
<td>Count</td>
|
||||
<td>Pass</td>
|
||||
<td>Fail</td>
|
||||
<td>Error</td>
|
||||
<td>View</td>
|
||||
</tr>
|
||||
|
||||
<tr class='passClass'>
|
||||
<td>test_case.external.create_company.create_comp_spec.CreateCompSpec</td>
|
||||
<td>1</td>
|
||||
<td>1</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td><a href="javascript:showClassDetail('c1',1)">Detail</a></td>
|
||||
</tr>
|
||||
|
||||
<tr id='pt1.1' class='hiddenRow'>
|
||||
<td class='none'><div class='testcase'>test_verify_create_comp: 确认创建帐套功能,创建成功</div></td>
|
||||
<td colspan='5' align='center'>
|
||||
|
||||
<!--css div popup start-->
|
||||
<a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt1.1')" >
|
||||
pass</a>
|
||||
|
||||
<div id='div_pt1.1' class="popup_window">
|
||||
<div style='text-align: right; color:red;cursor:pointer'>
|
||||
<a onfocus='this.blur();' onclick="document.getElementById('div_pt1.1').style.display = 'none' " >
|
||||
[x]</a>
|
||||
</div>
|
||||
<pre>
|
||||
|
||||
pt1.1: 固定yk
|
||||
公司0714-2
|
||||
|
||||
|
||||
固定资产(最后一期折旧测试)
|
||||
公司0719-1
|
||||
公司0719-2
|
||||
公司0719-3
|
||||
|
||||
gd
|
||||
autotestyb
|
||||
0824大数据测试
|
||||
yiban有序(勿动)
|
||||
21221
|
||||
哈哈哈
|
||||
张宇迪
|
||||
1q1q
|
||||
期初-一般test
|
||||
LCK-YB
|
||||
小规模dddd
|
||||
yiban0804
|
||||
0810yiban冒烟测试
|
||||
0810yiban测试(勿动)
|
||||
|
||||
0927smokeTestComp0905
|
||||
0905冒烟测试公司7
|
||||
0905测试公司1
|
||||
|
||||
|
||||
0905测试公司5
|
||||
0905测试公司6
|
||||
|
||||
0927smokeTestCompyb0905
|
||||
0905测试公司9
|
||||
0905测试公司10
|
||||
0905测试公司11
|
||||
0905测试公司12
|
||||
0905测试公司13
|
||||
0905测试公司14
|
||||
0905测试公司15
|
||||
0905测试公司16
|
||||
0905测试公司17
|
||||
0905测试公司18
|
||||
0905测试公司19
|
||||
0905测试公司20
|
||||
0905测试公司21
|
||||
0905测试公司22
|
||||
0905测试公司23
|
||||
0905测试公司24
|
||||
0905测试公司25
|
||||
0905测试公司26
|
||||
0905测试公司27
|
||||
0905测试公司28
|
||||
0905测试公司29
|
||||
有序1
|
||||
有序2
|
||||
有序3
|
||||
资产负债0914
|
||||
|
||||
抵扣认证日期验证0916
|
||||
Aggrid
|
||||
0927创建公司测试冒烟
|
||||
0927创建公司小规模测试
|
||||
123
|
||||
7月开始启用
|
||||
跨年测试11月启用yb
|
||||
启用测试
|
||||
测试
|
||||
testyb
|
||||
|
||||
|
||||
跨年测试1月启用yb
|
||||
|
||||
12月启用跨年测试
|
||||
1130
|
||||
上海达尔威贸易有限公司
|
||||
|
||||
北京第一村
|
||||
北京有序科技有限公司
|
||||
北京有序云创有限公司8392
|
||||
北京有序云创有限公司6993
|
||||
北京有序云创有限公司1419
|
||||
北京有序云创有限公司3981
|
||||
北京有序云创有限公司2157
|
||||
北京有序云创有限公司7217
|
||||
北京有序云创有限公司3629
|
||||
北京有序云创有限公司5837
|
||||
北京有序云创有限公司8247
|
||||
北京有序云创有限公司7091
|
||||
北京有序云创有限公司8180
|
||||
北京有序云创有限公司5484
|
||||
北京有序云创有限公司6301
|
||||
comp_name_list= ['固定yk', '公司0714-2', '', '', '固定资产(最后一期折旧测试)', '公司0719-1', '公司0719-2', '公司0719-3', '', 'gd', 'autotestyb', '0824大数据测试', 'yiban有序(勿动)', '21221', '哈哈哈', '张宇迪', '1q1q', '期初-一般test', 'LCK-YB', '小规模dddd', 'yiban0804', '0810yiban冒烟测试', '0810yiban测试(勿动)', '', '0927smokeTestComp0905', '0905冒烟测试公司7', '0905测试公司1', '', '', '0905测试公司5', '0905测试公司6', '', '0927smokeTestCompyb0905', '0905测试公司9', '0905测试公司10', '0905测试公司11', '0905测试公司12', '0905测试公司13', '0905测试公司14', '0905测试公司15', '0905测试公司16', '0905测试公司17', '0905测试公司18', '0905测试公司19', '0905测试公司20', '0905测试公司21', '0905测试公司22', '0905测试公司23', '0905测试公司24', '0905测试公司25', '0905测试公司26', '0905测试公司27', '0905测试公司28', '0905测试公司29', '有序1', '有序2', '有序3', '资产负债0914', '', '抵扣认证日期验证0916', 'Aggrid', '0927创建公司测试冒烟', '0927创建公司小规模测试', '123', '7月开始启用', '跨年测试11月启用yb', '启用测试', '测试', 'testyb', '', '', '跨年测试1月启用yb', '', '12月启用跨年测试', '1130', '上海达尔威贸易有限公司', '', '北京第一村', '北京有序科技有限公司', '北京有序云创有限公司8392', '北京有序云创有限公司6993', '北京有序云创有限公司1419', '北京有序云创有限公司3981', '北京有序云创有限公司2157', '北京有序云创有限公司7217', '北京有序云创有限公司3629', '北京有序云创有限公司5837', '北京有序云创有限公司8247', '北京有序云创有限公司7091', '北京有序云创有限公司8180', '北京有序云创有限公司5484', '北京有序云创有限公司6301']
|
||||
创建帐套页面now
|
||||
create_comp_info=> ['创建帐套测试', '北京有序云创有限公司', '2013小企业会计准则', '一般纳税人', '', 8.0, '2018', '8', '2', '金慧', '10000', '123', 'IT、信息、软件、技术服务', '北京市', '市辖区', '海淀区', 'msg_save', 'create_save', '测试创建帐套', '创建成功', '正例']
|
||||
comp_num_loc=> <selenium.webdriver.remote.webelement.WebElement (session="a4526d59e8958f8acba552b98b470611", element="0.13059692416585245-2")>
|
||||
comp_num= 创建帐套测试
|
||||
num=> 创建帐套测试9603
|
||||
month_index=> 7
|
||||
未查到详细信息 填写
|
||||
text=> 未查到详细信息 填写
|
||||
按钮名称: 帐套信息保存
|
||||
按钮名称: 保存创建
|
||||
固定yk
|
||||
公司0714-2
|
||||
|
||||
|
||||
固定资产(最后一期折旧测试)
|
||||
公司0719-1
|
||||
公司0719-2
|
||||
公司0719-3
|
||||
|
||||
gd
|
||||
autotestyb
|
||||
0824大数据测试
|
||||
yiban有序(勿动)
|
||||
21221
|
||||
哈哈哈
|
||||
张宇迪
|
||||
1q1q
|
||||
期初-一般test
|
||||
LCK-YB
|
||||
小规模dddd
|
||||
yiban0804
|
||||
0810yiban冒烟测试
|
||||
0810yiban测试(勿动)
|
||||
|
||||
0927smokeTestComp0905
|
||||
0905冒烟测试公司7
|
||||
0905测试公司1
|
||||
|
||||
|
||||
0905测试公司5
|
||||
0905测试公司6
|
||||
|
||||
0927smokeTestCompyb0905
|
||||
0905测试公司9
|
||||
0905测试公司10
|
||||
0905测试公司11
|
||||
0905测试公司12
|
||||
0905测试公司13
|
||||
0905测试公司14
|
||||
0905测试公司15
|
||||
0905测试公司16
|
||||
0905测试公司17
|
||||
0905测试公司18
|
||||
0905测试公司19
|
||||
0905测试公司20
|
||||
0905测试公司21
|
||||
0905测试公司22
|
||||
0905测试公司23
|
||||
0905测试公司24
|
||||
0905测试公司25
|
||||
0905测试公司26
|
||||
0905测试公司27
|
||||
0905测试公司28
|
||||
0905测试公司29
|
||||
有序1
|
||||
有序2
|
||||
有序3
|
||||
资产负债0914
|
||||
|
||||
抵扣认证日期验证0916
|
||||
Aggrid
|
||||
0927创建公司测试冒烟
|
||||
0927创建公司小规模测试
|
||||
123
|
||||
7月开始启用
|
||||
跨年测试11月启用yb
|
||||
启用测试
|
||||
测试
|
||||
testyb
|
||||
|
||||
|
||||
跨年测试1月启用yb
|
||||
|
||||
12月启用跨年测试
|
||||
1130
|
||||
上海达尔威贸易有限公司
|
||||
|
||||
北京第一村
|
||||
北京有序科技有限公司
|
||||
北京有序云创有限公司8392
|
||||
北京有序云创有限公司6993
|
||||
北京有序云创有限公司1419
|
||||
北京有序云创有限公司3981
|
||||
北京有序云创有限公司2157
|
||||
北京有序云创有限公司7217
|
||||
北京有序云创有限公司3629
|
||||
北京有序云创有限公司5837
|
||||
北京有序云创有限公司8247
|
||||
北京有序云创有限公司7091
|
||||
北京有序云创有限公司8180
|
||||
北京有序云创有限公司5484
|
||||
北京有序云创有限公司6301
|
||||
北京有序云创有限公司4269
|
||||
comp_name_list= ['固定yk', '公司0714-2', '', '', '固定资产(最后一期折旧测试)', '公司0719-1', '公司0719-2', '公司0719-3', '', 'gd', 'autotestyb', '0824大数据测试', 'yiban有序(勿动)', '21221', '哈哈哈', '张宇迪', '1q1q', '期初-一般test', 'LCK-YB', '小规模dddd', 'yiban0804', '0810yiban冒烟测试', '0810yiban测试(勿动)', '', '0927smokeTestComp0905', '0905冒烟测试公司7', '0905测试公司1', '', '', '0905测试公司5', '0905测试公司6', '', '0927smokeTestCompyb0905', '0905测试公司9', '0905测试公司10', '0905测试公司11', '0905测试公司12', '0905测试公司13', '0905测试公司14', '0905测试公司15', '0905测试公司16', '0905测试公司17', '0905测试公司18', '0905测试公司19', '0905测试公司20', '0905测试公司21', '0905测试公司22', '0905测试公司23', '0905测试公司24', '0905测试公司25', '0905测试公司26', '0905测试公司27', '0905测试公司28', '0905测试公司29', '有序1', '有序2', '有序3', '资产负债0914', '', '抵扣认证日期验证0916', 'Aggrid', '0927创建公司测试冒烟', '0927创建公司小规模测试', '123', '7月开始启用', '跨年测试11月启用yb', '启用测试', '测试', 'testyb', '', '', '跨年测试1月启用yb', '', '12月启用跨年测试', '1130', '上海达尔威贸易有限公司', '', '北京第一村', '北京有序科技有限公司', '北京有序云创有限公司8392', '北京有序云创有限公司6993', '北京有序云创有限公司1419', '北京有序云创有限公司3981', '北京有序云创有限公司2157', '北京有序云创有限公司7217', '北京有序云创有限公司3629', '北京有序云创有限公司5837', '北京有序云创有限公司8247', '北京有序云创有限公司7091', '北京有序云创有限公司8180', '北京有序云创有限公司5484', '北京有序云创有限公司6301', '北京有序云创有限公司4269']
|
||||
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
<!--css div popup end-->
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id='total_row'>
|
||||
<td>Total</td>
|
||||
<td>1</td>
|
||||
<td>1</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id='ending'> </div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,299 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>管有账测试报告</title>
|
||||
<meta name="generator" content="HTMLTestRunner 0.8.2"/>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
|
||||
<style type="text/css" media="screen">
|
||||
body { font-family: verdana, arial, helvetica, sans-serif; font-size: 80%; }
|
||||
table { font-size: 100%; }
|
||||
pre { }
|
||||
|
||||
/* -- heading ---------------------------------------------------------------------- */
|
||||
h1 {
|
||||
font-size: 16pt;
|
||||
color: gray;
|
||||
}
|
||||
.heading {
|
||||
margin-top: 0ex;
|
||||
margin-bottom: 1ex;
|
||||
}
|
||||
|
||||
.heading .attribute {
|
||||
margin-top: 1ex;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.heading .description {
|
||||
margin-top: 4ex;
|
||||
margin-bottom: 6ex;
|
||||
}
|
||||
|
||||
/* -- css div popup ------------------------------------------------------------------------ */
|
||||
a.popup_link {
|
||||
}
|
||||
|
||||
a.popup_link:hover {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.popup_window {
|
||||
display: none;
|
||||
position: relative;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
/*border: solid #627173 1px; */
|
||||
padding: 10px;
|
||||
background-color: #E6E6D6;
|
||||
font-family: "Lucida Console", "Courier New", Courier, monospace;
|
||||
text-align: left;
|
||||
font-size: 8pt;
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
}
|
||||
/* -- report ------------------------------------------------------------------------ */
|
||||
#show_detail_line {
|
||||
margin-top: 3ex;
|
||||
margin-bottom: 1ex;
|
||||
}
|
||||
#result_table {
|
||||
width: 80%;
|
||||
border-collapse: collapse;
|
||||
border: 1px solid #777;
|
||||
}
|
||||
#header_row {
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
background-color: #777;
|
||||
}
|
||||
#result_table td {
|
||||
border: 1px solid #777;
|
||||
padding: 2px;
|
||||
}
|
||||
#total_row { font-weight: bold; }
|
||||
.passClass { background-color: #6c6; }
|
||||
.failClass { background-color: #c60; }
|
||||
.errorClass { background-color: #c00; }
|
||||
.passCase { color: #6c6; }
|
||||
.failCase { color: #c60; font-weight: bold; }
|
||||
.errorCase { color: #c00; font-weight: bold; }
|
||||
.hiddenRow { display: none; }
|
||||
.testcase { margin-left: 2em; }
|
||||
|
||||
|
||||
/* -- ending ---------------------------------------------------------------------- */
|
||||
#ending {
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<script language="javascript" type="text/javascript"><!--
|
||||
output_list = Array();
|
||||
|
||||
/* level - 0:Summary; 1:Failed; 2:All */
|
||||
function showCase(level) {
|
||||
trs = document.getElementsByTagName("tr");
|
||||
for (var i = 0; i < trs.length; i++) {
|
||||
tr = trs[i];
|
||||
id = tr.id;
|
||||
if (id.substr(0,2) == 'ft') {
|
||||
if (level < 1) {
|
||||
tr.className = 'hiddenRow';
|
||||
}
|
||||
else {
|
||||
tr.className = '';
|
||||
}
|
||||
}
|
||||
if (id.substr(0,2) == 'pt') {
|
||||
if (level > 1) {
|
||||
tr.className = '';
|
||||
}
|
||||
else {
|
||||
tr.className = 'hiddenRow';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function showClassDetail(cid, count) {
|
||||
var id_list = Array(count);
|
||||
var toHide = 1;
|
||||
for (var i = 0; i < count; i++) {
|
||||
tid0 = 't' + cid.substr(1) + '.' + (i+1);
|
||||
tid = 'f' + tid0;
|
||||
tr = document.getElementById(tid);
|
||||
if (!tr) {
|
||||
tid = 'p' + tid0;
|
||||
tr = document.getElementById(tid);
|
||||
}
|
||||
id_list[i] = tid;
|
||||
if (tr.className) {
|
||||
toHide = 0;
|
||||
}
|
||||
}
|
||||
for (var i = 0; i < count; i++) {
|
||||
tid = id_list[i];
|
||||
if (toHide) {
|
||||
document.getElementById('div_'+tid).style.display = 'none'
|
||||
document.getElementById(tid).className = 'hiddenRow';
|
||||
}
|
||||
else {
|
||||
document.getElementById(tid).className = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function showTestDetail(div_id){
|
||||
var details_div = document.getElementById(div_id)
|
||||
var displayState = details_div.style.display
|
||||
// alert(displayState)
|
||||
if (displayState != 'block' ) {
|
||||
displayState = 'block'
|
||||
details_div.style.display = 'block'
|
||||
}
|
||||
else {
|
||||
details_div.style.display = 'none'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function html_escape(s) {
|
||||
s = s.replace(/&/g,'&');
|
||||
s = s.replace(/</g,'<');
|
||||
s = s.replace(/>/g,'>');
|
||||
return s;
|
||||
}
|
||||
|
||||
/* obsoleted by detail in <div>
|
||||
function showOutput(id, name) {
|
||||
var w = window.open("", //url
|
||||
name,
|
||||
"resizable,scrollbars,status,width=800,height=450");
|
||||
d = w.document;
|
||||
d.write("<pre>");
|
||||
d.write(html_escape(output_list[id]));
|
||||
d.write("\n");
|
||||
d.write("<a href='javascript:window.close()'>close</a>\n");
|
||||
d.write("</pre>\n");
|
||||
d.close();
|
||||
}
|
||||
*/
|
||||
--></script>
|
||||
|
||||
<div class='heading'>
|
||||
<h1>管有账测试报告</h1>
|
||||
<p class='attribute'><strong>Start Time:</strong> 2018-02-01 17:28:29</p>
|
||||
<p class='attribute'><strong>Duration:</strong> 0:00:39.716272</p>
|
||||
<p class='attribute'><strong>Status:</strong> Error 1</p>
|
||||
|
||||
<p class='description'>测试用例执行情况:</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<p id='show_detail_line'>Show
|
||||
<a href='javascript:showCase(0)'>Summary</a>
|
||||
<a href='javascript:showCase(1)'>Failed</a>
|
||||
<a href='javascript:showCase(2)'>All</a>
|
||||
</p>
|
||||
<table id='result_table'>
|
||||
<colgroup>
|
||||
<col align='left' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
</colgroup>
|
||||
<tr id='header_row'>
|
||||
<td>Test Group/Test case</td>
|
||||
<td>Count</td>
|
||||
<td>Pass</td>
|
||||
<td>Fail</td>
|
||||
<td>Error</td>
|
||||
<td>View</td>
|
||||
</tr>
|
||||
|
||||
<tr class='errorClass'>
|
||||
<td>test_case.external.create_company.create_comp_spec.CreateCompSpec</td>
|
||||
<td>1</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>1</td>
|
||||
<td><a href="javascript:showClassDetail('c1',1)">Detail</a></td>
|
||||
</tr>
|
||||
|
||||
<tr id='ft1.1' class='none'>
|
||||
<td class='errorCase'><div class='testcase'>test_verify_create_comp: 确认创建帐套功能,创建成功</div></td>
|
||||
<td colspan='5' align='center'>
|
||||
|
||||
<!--css div popup start-->
|
||||
<a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_ft1.1')" >
|
||||
error</a>
|
||||
|
||||
<div id='div_ft1.1' class="popup_window">
|
||||
<div style='text-align: right; color:red;cursor:pointer'>
|
||||
<a onfocus='this.blur();' onclick="document.getElementById('div_ft1.1').style.display = 'none' " >
|
||||
[x]</a>
|
||||
</div>
|
||||
<pre>
|
||||
|
||||
ft1.1: comp_name_list= ['固定yk', '公司0714-2', '', '', '固定资产(最后一期折旧测试)', '公司0719-1', '公司0719-2', '公司0719-3', '', 'gd', 'autotestyb', '0824大数据测试', 'yiban有序(勿动)', '21221', '哈哈哈', '张宇迪', '1q1q', '期初-一般test', 'LCK-YB', '小规模dddd', 'yiban0804', '0810yiban冒烟测试', '0810yiban测试(勿动)', '', '0927smokeTestComp0905', '0905冒烟测试公司7', '0905测试公司1', '', '', '0905测试公司5', '0905测试公司6', '', '0927smokeTestCompyb0905', '0905测试公司9', '0905测试公司10', '0905测试公司11', '0905测试公司12', '0905测试公司13', '0905测试公司14', '0905测试公司15', '0905测试公司16', '0905测试公司17', '0905测试公司18', '0905测试公司19', '0905测试公司20', '0905测试公司21', '0905测试公司22', '0905测试公司23', '0905测试公司24', '0905测试公司25', '0905测试公司26', '0905测试公司27', '0905测试公司28', '0905测试公司29', '有序1', '有序2', '有序3', '资产负债0914', '', '抵扣认证日期验证0916', 'Aggrid', '0927创建公司测试冒烟', '0927创建公司小规模测试', '123', '7月开始启用', '跨年测试11月启用yb', '启用测试', '测试', 'testyb', '', '', '跨年测试1月启用yb', '', '12月启用跨年测试', '1130', '上海达尔威贸易有限公司', '', '北京第一村', '北京有序科技有限公司', '北京有序云创有限公司8392', '北京有序云创有限公司6993', '北京有序云创有限公司1419', '北京有序云创有限公司3981', '北京有序云创有限公司2157', '北京有序云创有限公司7217', '北京有序云创有限公司3629', '北京有序云创有限公司5837', '北京有序云创有限公司8247', '北京有序云创有限公司7091', '北京有序云创有限公司8180', '北京有序云创有限公司5484', '北京有序云创有限公司6301', '北京有序云创有限公司4269']
|
||||
创建帐套页面now
|
||||
create_comp_info=> ['创建帐套测试', '北京有序云创有限公司', '2013小企业会计准则', '一般纳税人', '', 8.0, '2018', '8', '2', '金慧', '10000', '123', 'IT、信息、软件、技术服务', '北京市', '市辖区', '海淀区', 'msg_save', 'create_save', '测试创建帐套', '创建成功', '正例']
|
||||
comp_num_loc=> <selenium.webdriver.remote.webelement.WebElement (session="ecbdf95d966049f3eae6c843f858c6fd", element="0.4235938469829439-2")>
|
||||
comp_num= 创建帐套测试
|
||||
num=> 创建帐套测试735
|
||||
month_index=> 7
|
||||
text=> 未查到详细信息 填写
|
||||
按钮名称: 帐套信息保存
|
||||
按钮名称: 保存创建
|
||||
Traceback (most recent call last):
|
||||
File "/Users/huangcaiyan/work/e2e-test/test_case/external/create_company/create_comp_spec.py", line 48, in test_verify_create_comp
|
||||
new_comp_name_list_len = len( compLisPage.get_comp_name_list() )
|
||||
File "/Users/huangcaiyan/work/e2e-test/test_case/external/comp_list/comp_list_page.py", line 101, in get_comp_name_list
|
||||
name_loc = tr_locs[ tr_index ].find_element_by_xpath( name_xpath )
|
||||
File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/webelement.py", line 263, in find_element_by_xpath
|
||||
return self.find_element(by=By.XPATH, value=xpath)
|
||||
File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/webelement.py", line 518, in find_element
|
||||
{"using": by, "value": value})['value']
|
||||
File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/webelement.py", line 501, in _execute
|
||||
return self._parent.execute(command, params)
|
||||
File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 308, in execute
|
||||
self.error_handler.check_response(response)
|
||||
File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response
|
||||
raise exception_class(message, screen, stacktrace)
|
||||
selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: element is not attached to the page document
|
||||
(Session info: chrome=63.0.3239.132)
|
||||
(Driver info: chromedriver=2.33.506106 (8a06c39c4582fbfbab6966dbb1c38a9173bfb1a2),platform=Mac OS X 10.11.6 x86_64)
|
||||
|
||||
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
<!--css div popup end-->
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id='total_row'>
|
||||
<td>Total</td>
|
||||
<td>1</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>1</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id='ending'> </div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,281 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>管有账测试报告</title>
|
||||
<meta name="generator" content="HTMLTestRunner 0.8.2"/>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
|
||||
<style type="text/css" media="screen">
|
||||
body { font-family: verdana, arial, helvetica, sans-serif; font-size: 80%; }
|
||||
table { font-size: 100%; }
|
||||
pre { }
|
||||
|
||||
/* -- heading ---------------------------------------------------------------------- */
|
||||
h1 {
|
||||
font-size: 16pt;
|
||||
color: gray;
|
||||
}
|
||||
.heading {
|
||||
margin-top: 0ex;
|
||||
margin-bottom: 1ex;
|
||||
}
|
||||
|
||||
.heading .attribute {
|
||||
margin-top: 1ex;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.heading .description {
|
||||
margin-top: 4ex;
|
||||
margin-bottom: 6ex;
|
||||
}
|
||||
|
||||
/* -- css div popup ------------------------------------------------------------------------ */
|
||||
a.popup_link {
|
||||
}
|
||||
|
||||
a.popup_link:hover {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.popup_window {
|
||||
display: none;
|
||||
position: relative;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
/*border: solid #627173 1px; */
|
||||
padding: 10px;
|
||||
background-color: #E6E6D6;
|
||||
font-family: "Lucida Console", "Courier New", Courier, monospace;
|
||||
text-align: left;
|
||||
font-size: 8pt;
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
}
|
||||
/* -- report ------------------------------------------------------------------------ */
|
||||
#show_detail_line {
|
||||
margin-top: 3ex;
|
||||
margin-bottom: 1ex;
|
||||
}
|
||||
#result_table {
|
||||
width: 80%;
|
||||
border-collapse: collapse;
|
||||
border: 1px solid #777;
|
||||
}
|
||||
#header_row {
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
background-color: #777;
|
||||
}
|
||||
#result_table td {
|
||||
border: 1px solid #777;
|
||||
padding: 2px;
|
||||
}
|
||||
#total_row { font-weight: bold; }
|
||||
.passClass { background-color: #6c6; }
|
||||
.failClass { background-color: #c60; }
|
||||
.errorClass { background-color: #c00; }
|
||||
.passCase { color: #6c6; }
|
||||
.failCase { color: #c60; font-weight: bold; }
|
||||
.errorCase { color: #c00; font-weight: bold; }
|
||||
.hiddenRow { display: none; }
|
||||
.testcase { margin-left: 2em; }
|
||||
|
||||
|
||||
/* -- ending ---------------------------------------------------------------------- */
|
||||
#ending {
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<script language="javascript" type="text/javascript"><!--
|
||||
output_list = Array();
|
||||
|
||||
/* level - 0:Summary; 1:Failed; 2:All */
|
||||
function showCase(level) {
|
||||
trs = document.getElementsByTagName("tr");
|
||||
for (var i = 0; i < trs.length; i++) {
|
||||
tr = trs[i];
|
||||
id = tr.id;
|
||||
if (id.substr(0,2) == 'ft') {
|
||||
if (level < 1) {
|
||||
tr.className = 'hiddenRow';
|
||||
}
|
||||
else {
|
||||
tr.className = '';
|
||||
}
|
||||
}
|
||||
if (id.substr(0,2) == 'pt') {
|
||||
if (level > 1) {
|
||||
tr.className = '';
|
||||
}
|
||||
else {
|
||||
tr.className = 'hiddenRow';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function showClassDetail(cid, count) {
|
||||
var id_list = Array(count);
|
||||
var toHide = 1;
|
||||
for (var i = 0; i < count; i++) {
|
||||
tid0 = 't' + cid.substr(1) + '.' + (i+1);
|
||||
tid = 'f' + tid0;
|
||||
tr = document.getElementById(tid);
|
||||
if (!tr) {
|
||||
tid = 'p' + tid0;
|
||||
tr = document.getElementById(tid);
|
||||
}
|
||||
id_list[i] = tid;
|
||||
if (tr.className) {
|
||||
toHide = 0;
|
||||
}
|
||||
}
|
||||
for (var i = 0; i < count; i++) {
|
||||
tid = id_list[i];
|
||||
if (toHide) {
|
||||
document.getElementById('div_'+tid).style.display = 'none'
|
||||
document.getElementById(tid).className = 'hiddenRow';
|
||||
}
|
||||
else {
|
||||
document.getElementById(tid).className = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function showTestDetail(div_id){
|
||||
var details_div = document.getElementById(div_id)
|
||||
var displayState = details_div.style.display
|
||||
// alert(displayState)
|
||||
if (displayState != 'block' ) {
|
||||
displayState = 'block'
|
||||
details_div.style.display = 'block'
|
||||
}
|
||||
else {
|
||||
details_div.style.display = 'none'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function html_escape(s) {
|
||||
s = s.replace(/&/g,'&');
|
||||
s = s.replace(/</g,'<');
|
||||
s = s.replace(/>/g,'>');
|
||||
return s;
|
||||
}
|
||||
|
||||
/* obsoleted by detail in <div>
|
||||
function showOutput(id, name) {
|
||||
var w = window.open("", //url
|
||||
name,
|
||||
"resizable,scrollbars,status,width=800,height=450");
|
||||
d = w.document;
|
||||
d.write("<pre>");
|
||||
d.write(html_escape(output_list[id]));
|
||||
d.write("\n");
|
||||
d.write("<a href='javascript:window.close()'>close</a>\n");
|
||||
d.write("</pre>\n");
|
||||
d.close();
|
||||
}
|
||||
*/
|
||||
--></script>
|
||||
|
||||
<div class='heading'>
|
||||
<h1>管有账测试报告</h1>
|
||||
<p class='attribute'><strong>Start Time:</strong> 2018-02-01 17:29:46</p>
|
||||
<p class='attribute'><strong>Duration:</strong> 0:00:44.303788</p>
|
||||
<p class='attribute'><strong>Status:</strong> Pass 1</p>
|
||||
|
||||
<p class='description'>测试用例执行情况:</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<p id='show_detail_line'>Show
|
||||
<a href='javascript:showCase(0)'>Summary</a>
|
||||
<a href='javascript:showCase(1)'>Failed</a>
|
||||
<a href='javascript:showCase(2)'>All</a>
|
||||
</p>
|
||||
<table id='result_table'>
|
||||
<colgroup>
|
||||
<col align='left' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
</colgroup>
|
||||
<tr id='header_row'>
|
||||
<td>Test Group/Test case</td>
|
||||
<td>Count</td>
|
||||
<td>Pass</td>
|
||||
<td>Fail</td>
|
||||
<td>Error</td>
|
||||
<td>View</td>
|
||||
</tr>
|
||||
|
||||
<tr class='passClass'>
|
||||
<td>test_case.external.create_company.create_comp_spec.CreateCompSpec</td>
|
||||
<td>1</td>
|
||||
<td>1</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td><a href="javascript:showClassDetail('c1',1)">Detail</a></td>
|
||||
</tr>
|
||||
|
||||
<tr id='pt1.1' class='hiddenRow'>
|
||||
<td class='none'><div class='testcase'>test_verify_create_comp: 确认创建帐套功能,创建成功</div></td>
|
||||
<td colspan='5' align='center'>
|
||||
|
||||
<!--css div popup start-->
|
||||
<a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt1.1')" >
|
||||
pass</a>
|
||||
|
||||
<div id='div_pt1.1' class="popup_window">
|
||||
<div style='text-align: right; color:red;cursor:pointer'>
|
||||
<a onfocus='this.blur();' onclick="document.getElementById('div_pt1.1').style.display = 'none' " >
|
||||
[x]</a>
|
||||
</div>
|
||||
<pre>
|
||||
|
||||
pt1.1: comp_name_list= ['固定yk', '公司0714-2', '', '', '固定资产(最后一期折旧测试)', '公司0719-1', '公司0719-2', '公司0719-3', '', 'gd', 'autotestyb', '0824大数据测试', 'yiban有序(勿动)', '21221', '哈哈哈', '张宇迪', '1q1q', '期初-一般test', 'LCK-YB', '小规模dddd', 'yiban0804', '0810yiban冒烟测试', '0810yiban测试(勿动)', '', '0927smokeTestComp0905', '0905冒烟测试公司7', '0905测试公司1', '', '', '0905测试公司5', '0905测试公司6', '', '0927smokeTestCompyb0905', '0905测试公司9', '0905测试公司10', '0905测试公司11', '0905测试公司12', '0905测试公司13', '0905测试公司14', '0905测试公司15', '0905测试公司16', '0905测试公司17', '0905测试公司18', '0905测试公司19', '0905测试公司20', '0905测试公司21', '0905测试公司22', '0905测试公司23', '0905测试公司24', '0905测试公司25', '0905测试公司26', '0905测试公司27', '0905测试公司28', '0905测试公司29', '有序1', '有序2', '有序3', '资产负债0914', '', '抵扣认证日期验证0916', 'Aggrid', '0927创建公司测试冒烟', '0927创建公司小规模测试', '123', '7月开始启用', '跨年测试11月启用yb', '启用测试', '测试', 'testyb', '', '', '跨年测试1月启用yb', '', '12月启用跨年测试', '1130', '上海达尔威贸易有限公司', '', '北京第一村', '北京有序科技有限公司', '北京有序云创有限公司8392', '北京有序云创有限公司6993', '北京有序云创有限公司1419', '北京有序云创有限公司3981', '北京有序云创有限公司2157', '北京有序云创有限公司7217', '北京有序云创有限公司3629', '北京有序云创有限公司5837', '北京有序云创有限公司8247', '北京有序云创有限公司7091', '北京有序云创有限公司8180', '北京有序云创有限公司5484', '北京有序云创有限公司6301', '北京有序云创有限公司4269', '北京有序云创有限公司9246']
|
||||
创建帐套页面now
|
||||
create_comp_info=> ['创建帐套测试', '北京有序云创有限公司', '2013小企业会计准则', '一般纳税人', '', 8.0, '2018', '8', '2', '金慧', '10000', '123', 'IT、信息、软件、技术服务', '北京市', '市辖区', '海淀区', 'msg_save', 'create_save', '测试创建帐套', '创建成功', '正例']
|
||||
comp_num_loc=> <selenium.webdriver.remote.webelement.WebElement (session="a74f1bef7307ed0b808a23fba921701e", element="0.6973222441962172-2")>
|
||||
comp_num= 创建帐套测试
|
||||
num=> 创建帐套测试2464
|
||||
month_index=> 7
|
||||
text=> 未查到详细信息 填写
|
||||
按钮名称: 帐套信息保存
|
||||
按钮名称: 保存创建
|
||||
comp_name_list= ['固定yk', '公司0714-2', '', '', '固定资产(最后一期折旧测试)', '公司0719-1', '公司0719-2', '公司0719-3', '', 'gd', 'autotestyb', '0824大数据测试', 'yiban有序(勿动)', '21221', '哈哈哈', '张宇迪', '1q1q', '期初-一般test', 'LCK-YB', '小规模dddd', 'yiban0804', '0810yiban冒烟测试', '0810yiban测试(勿动)', '', '0927smokeTestComp0905', '0905冒烟测试公司7', '0905测试公司1', '', '', '0905测试公司5', '0905测试公司6', '', '0927smokeTestCompyb0905', '0905测试公司9', '0905测试公司10', '0905测试公司11', '0905测试公司12', '0905测试公司13', '0905测试公司14', '0905测试公司15', '0905测试公司16', '0905测试公司17', '0905测试公司18', '0905测试公司19', '0905测试公司20', '0905测试公司21', '0905测试公司22', '0905测试公司23', '0905测试公司24', '0905测试公司25', '0905测试公司26', '0905测试公司27', '0905测试公司28', '0905测试公司29', '有序1', '有序2', '有序3', '资产负债0914', '', '抵扣认证日期验证0916', 'Aggrid', '0927创建公司测试冒烟', '0927创建公司小规模测试', '123', '7月开始启用', '跨年测试11月启用yb', '启用测试', '测试', 'testyb', '', '', '跨年测试1月启用yb', '', '12月启用跨年测试', '1130', '上海达尔威贸易有限公司', '', '北京第一村', '北京有序科技有限公司', '北京有序云创有限公司8392', '北京有序云创有限公司6993', '北京有序云创有限公司1419', '北京有序云创有限公司3981', '北京有序云创有限公司2157', '北京有序云创有限公司7217', '北京有序云创有限公司3629', '北京有序云创有限公司5837', '北京有序云创有限公司8247', '北京有序云创有限公司7091', '北京有序云创有限公司8180', '北京有序云创有限公司5484', '北京有序云创有限公司6301', '北京有序云创有限公司4269', '北京有序云创有限公司9246', '北京有序云创有限公司2062']
|
||||
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
<!--css div popup end-->
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id='total_row'>
|
||||
<td>Total</td>
|
||||
<td>1</td>
|
||||
<td>1</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id='ending'> </div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -3,6 +3,7 @@ import time
|
|||
from HTMLTestRunner import HTMLTestRunner
|
||||
|
||||
from test_case.invoice.record_invoice.record_invoice_spec import RecordInvoiceSpec
|
||||
from test_case.external.create_company.create_comp_spec import CreateCompSpec
|
||||
|
||||
if __name__ == '__main__':
|
||||
testSuite = unittest.TestSuite()
|
||||
|
@ -66,7 +67,7 @@ if __name__ == '__main__':
|
|||
# # # 记所有类别发票
|
||||
# testSuite.addTest(RecordInvoiceSpec('test_record_input_invoice'))
|
||||
# testSuite.addTest(RecordInvoiceSpec('test_record_output_invoice'))
|
||||
testSuite.addTest(RecordInvoiceSpec('test_record_output_invoice_xgm'))
|
||||
# testSuite.addTest(RecordInvoiceSpec('test_record_output_invoice_xgm'))
|
||||
#
|
||||
# 报表
|
||||
#
|
||||
|
@ -80,7 +81,7 @@ if __name__ == '__main__':
|
|||
# 记录完全部收入、支出、互转,手指列表本月收入为42,650.92,支出为70,584.30
|
||||
# testSuite.addTest(EnterCompSpec('test_enter_comp'))
|
||||
# 创建帐套
|
||||
# testSuite.addTest(CreateCompSpec('test_verify_create_comp'))
|
||||
testSuite.addTest(CreateCompSpec('test_verify_create_comp'))
|
||||
# testSuite.addTest(CreateCompSpec('test_create_comp_empty_comp_name'))
|
||||
# testSuite.addTest(CreateCompSpec('test_create_comp_empty_legal_person'))
|
||||
# 帐套列表
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
# 启用期初帐按钮xpath
|
||||
start_btn_elem = '//*[@id="body"]/finance/div/beginning-period/div/div[3]/div[2]/div[2]/div[3]/button'
|
||||
# 编辑按钮xpath
|
||||
edit_btn_elem = '//*[@id="body"]/finance/div/beginning-period/div/div[3]/div[2]/div[2]/div[2]/button'
|
||||
# 导入按钮xpath
|
||||
import_btn_elem = '//*[@id="body"]/finance/div/beginning-period/div/div[3]/div[2]/div[2]/div[1]/button'
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
from selenium import webdriver
|
||||
import unittest
|
||||
import time
|
||||
from selenium.webdriver.support.ui import WebDriverWait
|
||||
|
||||
from util.public_page import PublicPage
|
||||
from .beginning_period_elem import *
|
||||
from util.upload_file_page import UploadFilePage
|
||||
|
||||
|
||||
# @Time :18/2/1 下午5:32
|
||||
# @Author :huangcaiyan
|
||||
# @File : beginning_period_page
|
||||
# @Software : PyCharm
|
||||
|
||||
|
||||
class BeginningPeriodPage:
|
||||
|
||||
def __init__( self , driver ):
|
||||
self.driver = driver # self.driver = webdriver.Chrome()
|
||||
|
||||
# ------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# 按钮
|
||||
def click_btn( self , btn_name ):
|
||||
"""
|
||||
:param btn_name: 按钮名称,可选值(start,edit,import)
|
||||
:return: 点击 '启用帐套''编辑'、'导入'按钮
|
||||
"""
|
||||
publicPage = PublicPage( self.driver )
|
||||
if btn_name == 'start':
|
||||
btn_elem = start_btn_elem
|
||||
elif btn_name == 'edit':
|
||||
btn_elem = edit_btn_elem
|
||||
elif btn_name == 'import':
|
||||
btn_elem = import_btn_elem
|
||||
publicPage.click_elem( btn_elem )
|
||||
|
||||
def import_initial_account( self , file_path ):
|
||||
"""
|
||||
:param file_path:
|
||||
:return:
|
||||
"""
|
||||
publicPage = PublicPage( self.driver )
|
||||
self.click_btn( 'edit' )
|
||||
WebDriverWait( self.driver , 30 , 1 ).until_not(
|
||||
lambda x: self.driver.find_element_by_id( 'fileUploadBtn' ).is_displayed() )
|
||||
uploadFilePage = UploadFilePage( self.driver , file_path )
|
||||
uploadFilePage.upload_file()
|
|
@ -0,0 +1,46 @@
|
|||
from selenium import webdriver
|
||||
import unittest
|
||||
import time
|
||||
|
||||
from util.public_page import PublicPage
|
||||
from ...login.login_page import LoginPage
|
||||
from comp_info import CompInfo
|
||||
from ..comp_list.comp_list_page import CompListPage
|
||||
from ..comp_list.distribute_modal.distribute_modal_page import DistributeModalPage
|
||||
|
||||
|
||||
# @Time :18/2/1 下午5:32
|
||||
# @Author :huangcaiyan
|
||||
# @File : beginning_period_spec
|
||||
# @Software : PyCharm
|
||||
|
||||
|
||||
class BeginningPeriodSpec( unittest.TestCase ):
|
||||
# {角色,帐套名称,会计名称,会计手机号}
|
||||
user_info = [ '会计' , '' , 'current_user' , '' ]
|
||||
|
||||
@classmethod
|
||||
def setUpClass( self ):
|
||||
self.driver = webdriver.Chrome()
|
||||
publicPage = PublicPage( self.driver )
|
||||
publicPage.max_window()
|
||||
self.driver.implicitly_wait( 30 )
|
||||
|
||||
loginPage = LoginPage( CompInfo.BASE_URL , self.driver )
|
||||
loginPage.login( CompInfo.LOGIN_DATA )
|
||||
|
||||
@classmethod
|
||||
def tearDownClass( self ):
|
||||
self.driver.quit()
|
||||
|
||||
def test_import_initial_account( self ):
|
||||
"""测试 导入期初帐"""
|
||||
compListPage = CompListPage( self.driver )
|
||||
distributePage = DistributeModalPage( self.driver )
|
||||
distributePage.invite_user( self.user_info )
|
||||
compListPage.enter_comp()
|
||||
time.sleep( 2 ) # page = BeginningPeriodSpec(self.driver)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
Binary file not shown.
|
@ -3,6 +3,8 @@ create_comp_btn_elem = '//*[@id="body"]/company-list/div[1]/div[2]/div[2]/button
|
|||
# 分配按钮 xpath
|
||||
assign_btn_elem = '//*[@id="company-table"]/tbody/tr[109]/td[5]/div/div'
|
||||
'//*[@id="company-table"]/tbody/tr[109]'
|
||||
# 帐套数量xpath
|
||||
comp_num_elem = '//*[@id="body"]/company-list/div[1]/div[2]/div[1]/span[2]'
|
||||
|
||||
# 顶部导航栏
|
||||
# 帐套名称xpath
|
||||
|
@ -10,3 +12,4 @@ account_company_name_elem = '//*[@id="wrapper"]/navbar/div/nav/div/div[2]/div/di
|
|||
# 登陆用户名字
|
||||
login_user_name_elem = '//*[@id="wrapper"]/navbar/div/nav/div/div[3]/a/span'
|
||||
|
||||
#
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
from selenium import webdriver
|
||||
import unittest, time
|
||||
import unittest , time
|
||||
import re
|
||||
|
||||
from util.public_page import PublicPage
|
||||
from .comp_list_elem import *
|
||||
|
@ -12,167 +13,167 @@ from test_case.login.login_page import LoginPage
|
|||
# @File : comp_list_page
|
||||
# @Software : PyCharm
|
||||
|
||||
class CompListPage(object):
|
||||
def __init__( self, driver ):
|
||||
class CompListPage( object ):
|
||||
def __init__( self , driver ):
|
||||
self.driver = driver
|
||||
# self.driver = webdriver.Chrome()
|
||||
|
||||
|
||||
def go_create_ways_page( self ):
|
||||
"""
|
||||
页面跳转至创建帐套方式页面
|
||||
"""
|
||||
publicPage = PublicPage(self.driver)
|
||||
self.driver.get(CompInfo.BASE_URL + '/create-ways')
|
||||
publicPage = PublicPage( self.driver )
|
||||
self.driver.get( CompInfo.BASE_URL + '/create-ways' )
|
||||
if not publicPage.wait_until_loader_disapeared():
|
||||
if '/create-ways' in self.driver.current_url:
|
||||
print('创建帐套方式页面now')
|
||||
print( '创建帐套方式页面now' )
|
||||
else:
|
||||
print('--去创建帐套方式页面 失败!')
|
||||
print( '--去创建帐套方式页面 失败!' )
|
||||
exit()
|
||||
else:
|
||||
print('--加载效果未消失,请求超时!')
|
||||
|
||||
print( '--加载效果未消失,请求超时!' )
|
||||
|
||||
def go_to_create_comp_page( self ):
|
||||
"""
|
||||
页面跳转至创建帐套页面
|
||||
"""
|
||||
publicPage = PublicPage(self.driver)
|
||||
self.driver.get(CompInfo.BASE_URL + '/create-company')
|
||||
publicPage = PublicPage( self.driver )
|
||||
self.driver.get( CompInfo.BASE_URL + '/create-company' )
|
||||
if not publicPage.wait_until_loader_disapeared():
|
||||
if '/create-company' in self.driver.current_url:
|
||||
print('创建帐套页面now')
|
||||
print( '创建帐套页面now' )
|
||||
else:
|
||||
print('--去创建帐套页面失败!')
|
||||
print( '--去创建帐套页面失败!' )
|
||||
exit()
|
||||
else:
|
||||
print('--加载效果未消失,请求超时!')
|
||||
print( '--加载效果未消失,请求超时!' )
|
||||
exit()
|
||||
|
||||
|
||||
def get_comp_num( self ):
|
||||
"""
|
||||
:return:返回帐套数量
|
||||
"""
|
||||
text_loc = self.driver.find_element_by_xpath( comp_num_elem )
|
||||
publicPage = PublicPage( self.driver )
|
||||
text = publicPage.get_value( text_loc )
|
||||
comp_num = re.findall( '\d+' , text )
|
||||
print( 'comp_num=' , comp_num[ 0 ] )
|
||||
return comp_num[ 0 ]
|
||||
|
||||
# 点击创建帐套按钮
|
||||
def click_create_comp_btn( self ):
|
||||
try:
|
||||
public_page = PublicPage(self.driver)
|
||||
btn_loc = self.driver.find_element_by_xpath(create_comp_btn_elem)
|
||||
public_page.click_elem(btn_loc)
|
||||
public_page = PublicPage( self.driver )
|
||||
btn_loc = self.driver.find_element_by_xpath( create_comp_btn_elem )
|
||||
public_page.click_elem( btn_loc )
|
||||
except Exception as e:
|
||||
print('[CompListPage]点击创建帐套按钮失败=>', str(e))
|
||||
|
||||
def get_accounting_book_property( self, accounting_book_name ):
|
||||
table = self.driver.find_element_by_tag_name('table')
|
||||
trList = table.find_elements_by_tag_name('tr')
|
||||
print('trList=>', trList)
|
||||
table_value = []
|
||||
print( '[CompListPage]点击创建帐套按钮失败=>' , str( e ) )
|
||||
|
||||
def get_accounting_book_property( self , accounting_book_name ):
|
||||
"""
|
||||
:param accounting_book_name: 帐套名称
|
||||
:return:帐套类型
|
||||
"""
|
||||
table = self.driver.find_element_by_tag_name( 'table' )
|
||||
trList = table.find_elements_by_tag_name( 'tr' )
|
||||
print( 'trList=>' , trList )
|
||||
table_value = [ ]
|
||||
for row in trList:
|
||||
tdList = row.find_elements_by_tag_name('td')
|
||||
cell_value = []
|
||||
tdList = row.find_elements_by_tag_name( 'td' )
|
||||
cell_value = [ ]
|
||||
for col in tdList:
|
||||
value = col.text
|
||||
cell_value.append(value)
|
||||
table_value.append(cell_value)
|
||||
print('table_value=>', table_value)
|
||||
|
||||
cell_value.append( value )
|
||||
table_value.append( cell_value )
|
||||
print( 'table_value=>' , table_value )
|
||||
|
||||
for name in cell_value:
|
||||
if accounting_book_name == name:
|
||||
tr_index = cell_value.index()
|
||||
print('tr_index=>', tr_index)
|
||||
|
||||
print( 'tr_index=>' , tr_index )
|
||||
|
||||
accounting_book_property_elem = '//*[@id="company-table"]/tbody/tr[' + tr_index + ']/td[3]/div/span'
|
||||
accounting_book_property_loc = self.driver.find_element_by_xpath(accounting_book_property_elem)
|
||||
accounting_book_property_loc = self.driver.find_element_by_xpath( accounting_book_property_elem )
|
||||
accounting_book_property = accounting_book_property_loc.text
|
||||
print('accounting_book_property=>', accounting_book_property)
|
||||
print( 'accounting_book_property=>' , accounting_book_property )
|
||||
return accounting_book_property
|
||||
|
||||
def enter_comp( self, comp_name ):
|
||||
|
||||
def get_comp_name_list( self ):
|
||||
"""
|
||||
:param comp_name: 帐套名称
|
||||
:return:获取帐套列表中所有帐套名称,并以list的形式返回。
|
||||
"""
|
||||
publicPage = PublicPage( self.driver )
|
||||
tr_locs = self.driver.find_element_by_tag_name( 'tbody' ).find_elements_by_tag_name( 'tr' )
|
||||
names = [ ]
|
||||
for tr_loc in tr_locs:
|
||||
tr_index = tr_locs.index( tr_loc )
|
||||
if len( tr_locs[ tr_index ].find_elements_by_tag_name( 'a' ) ) == 2:
|
||||
name_xpath = 'td[1]/div/div/a[2]'
|
||||
else:
|
||||
name_xpath = 'td[1]/div/div/a'
|
||||
name_loc = tr_locs[ tr_index ].find_element_by_xpath( name_xpath )
|
||||
name = publicPage.get_value( name_loc )
|
||||
names.append( name )
|
||||
print( 'comp_name_list=' , names )
|
||||
return names
|
||||
|
||||
def enter_comp( self , comp_name=None ):
|
||||
"""
|
||||
:param comp_name: 帐套名称(当帐套名称为空时,默认进入最后一个帐套)
|
||||
:return: 点击帐套名称进入帐套
|
||||
"""
|
||||
try:
|
||||
public_page = PublicPage(self.driver)
|
||||
comp_loc = self.driver.find_element_by_link_text(comp_name)
|
||||
public_page.click_elem(comp_loc)
|
||||
publicPage = PublicPage( self.driver )
|
||||
if comp_name is None:
|
||||
tr_locs = self.driver.find_element_by_tag_name( 'tbody' ).find_elements_by_tag_name( 'tr' )
|
||||
index = int( self.get_comp_num() ) - 1
|
||||
print( 'index=' , index )
|
||||
if len( tr_locs[ index ].find_elements_by_tag_name( 'a' ) ) == 2:
|
||||
name_xpath = 'td[1]/div/div/a[2]'
|
||||
else:
|
||||
name_xpath = 'td[1]/div/div/a'
|
||||
name_loc = tr_locs[ index ].find_element_by_xpath( name_xpath )
|
||||
comp_name = publicPage.get_value( name_loc )
|
||||
print( 'comp_name=' , comp_name )
|
||||
|
||||
comp_loc = self.driver.find_element_by_link_text( comp_name )
|
||||
publicPage.click_elem( comp_loc )
|
||||
except Exception as e:
|
||||
print('[CompListPage]enter_comp:进入帐套失败,失败原因=>', str(e))
|
||||
|
||||
def click_distribute_btn( self, comp_name, role ):
|
||||
print( '[CompListPage]enter_comp:进入帐套失败,失败原因=>' , str( e ) )
|
||||
|
||||
def click_distribute_btn( self , role , comp_name=None ):
|
||||
"""
|
||||
:param comp_name:帐套名称
|
||||
:param comp_name:帐套名称(当公司名称为空时,默认分配最后一个帐套⚠️)
|
||||
:param role:要分配的角色,可选值(客户联系人,会计,助理)
|
||||
:return:点击填写/分配按钮
|
||||
"""
|
||||
publicPage = PublicPage(self.driver)
|
||||
row_locs = self.driver.find_element_by_tag_name('tbody').find_elements_by_tag_name('tr')
|
||||
names = []
|
||||
for tr_index in range(len(row_locs)):
|
||||
a_loc = self.driver.find_element_by_tag_name('tbody').find_elements_by_tag_name('tr')[
|
||||
tr_index].find_element_by_tag_name('td').find_elements_by_tag_name('a')
|
||||
if len(a_loc) == 1:
|
||||
name_loc = a_loc[0]
|
||||
elif len(a_loc) == 2:
|
||||
name_loc = a_loc[1]
|
||||
|
||||
publicPage = PublicPage( self.driver )
|
||||
row_locs = self.driver.find_element_by_tag_name( 'tbody' ).find_elements_by_tag_name( 'tr' )
|
||||
names = [ ]
|
||||
for tr_index in range( len( row_locs ) ):
|
||||
a_loc = self.driver.find_element_by_tag_name( 'tbody' ).find_elements_by_tag_name( 'tr' )[
|
||||
tr_index ].find_element_by_tag_name( 'td' ).find_elements_by_tag_name( 'a' )
|
||||
if len( a_loc ) == 1:
|
||||
name_loc = a_loc[ 0 ]
|
||||
elif len( a_loc ) == 2:
|
||||
name_loc = a_loc[ 1 ]
|
||||
|
||||
name = name_loc.text
|
||||
names.append(name)
|
||||
names.append( name )
|
||||
# 获取当前帐套名称所在行索引
|
||||
index = names.index(comp_name) + 1
|
||||
if comp_name == '':
|
||||
index = int( self.get_comp_num() ) - 1
|
||||
else:
|
||||
index = names.index( comp_name ) + 1
|
||||
if role == '客户联系人':
|
||||
distribute_td_index = 4
|
||||
elif role == '会计':
|
||||
distribute_td_index = 5
|
||||
elif role == '助理':
|
||||
distribute_td_index = 6
|
||||
distribute_elem = 'tr[' + str(index) + ']/td[' + str(distribute_td_index) + ']/div/div'
|
||||
distribute_loc = self.driver.find_element_by_tag_name('tbody').find_element_by_xpath(distribute_elem)
|
||||
publicPage.click_elem(distribute_loc)
|
||||
|
||||
distribute_elem = 'tr[' + str( index ) + ']/td[' + str( distribute_td_index ) + ']/div/div'
|
||||
distribute_loc = self.driver.find_element_by_tag_name( 'tbody' ).find_element_by_xpath( distribute_elem )
|
||||
if distribute_loc.text == '':
|
||||
publicPage.click_elem( distribute_loc )
|
||||
time.sleep( 2 )
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
class Test(unittest.TestCase):
|
||||
def setUp( self ):
|
||||
self.driver = webdriver.Chrome()
|
||||
self.driver.implicitly_wait(30)
|
||||
|
||||
loginPage = LoginPage(CompInfo.BASE_URL, self.driver)
|
||||
loginPage.login(CompInfo.LOGIN_DATA)
|
||||
|
||||
def tearDown( self ):
|
||||
self.driver.quit()
|
||||
|
||||
# def test_click_create_comp_btn(self):
|
||||
# loginPage = LoginPage(CompInfo.BASE_URL, self.driver)
|
||||
# loginPage.login(CompInfo.LOGIN_DATA)
|
||||
# page = CompListPage(self.driver)
|
||||
# page.click_create_comp_btn()
|
||||
#
|
||||
# def test_go_to_create_ways_page(self):
|
||||
# publicPage = PublicPage(self.driver)
|
||||
# loginPage = LoginPage(CompInfo.BASE_URL, self.driver)
|
||||
# loginPage.login(CompInfo.LOGIN_DATA)
|
||||
# page = CompListPage(self.driver)
|
||||
# if not publicPage.wait_until_loader_disapeared():
|
||||
# page.go_create_ways_page()
|
||||
# time.sleep(2)
|
||||
# self.assertIn('create-ways', self.driver.current_url)
|
||||
#
|
||||
# def test_go_to_create_company_page(self):
|
||||
# publicPage = PublicPage(self.driver)
|
||||
# loginPage = LoginPage(CompInfo.BASE_URL, self.driver)
|
||||
# loginPage.login(CompInfo.LOGIN_DATA)
|
||||
# page = CompListPage(self.driver)
|
||||
# if not publicPage.wait_until_loader_disapeared():
|
||||
# page.go_to_create_comp_page()
|
||||
# time.sleep(2)
|
||||
# self.assertIn('create-company', self.driver.current_url)
|
||||
|
||||
def test_verify_distribute_btn( self ):
|
||||
publicPage = PublicPage(self.driver)
|
||||
page = CompListPage(self.driver)
|
||||
if not publicPage.wait_until_loader_disapeared():
|
||||
page.click_distribute_btn('固定yk', '会计')
|
||||
time.sleep(3)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
|
@ -11,24 +11,30 @@ from comp_info import CompInfo
|
|||
# @Author :huangcaiyan
|
||||
# @File : comp_list_page
|
||||
# @Software : PyCharm
|
||||
class CompListSpec(unittest.TestCase):
|
||||
class CompListSpec( unittest.TestCase ):
|
||||
@classmethod
|
||||
def setUpClass( self ):
|
||||
self.driver = webdriver.Chrome()
|
||||
publicPage = PublicPage(self.driver)
|
||||
publicPage = PublicPage( self.driver )
|
||||
publicPage.max_window()
|
||||
self.driver.implicitly_wait(30)
|
||||
|
||||
loginPage = LoginPage(CompInfo.BASE_URL, self.driver)
|
||||
loginPage.login(CompInfo.LOGIN_DATA)
|
||||
|
||||
self.driver.implicitly_wait( 30 )
|
||||
|
||||
loginPage = LoginPage( CompInfo.BASE_URL , self.driver )
|
||||
loginPage.login( CompInfo.LOGIN_DATA )
|
||||
|
||||
@classmethod
|
||||
def tearDownClass( self ):
|
||||
self.driver.quit()
|
||||
|
||||
def test_distribute_accounting( self ):
|
||||
page = CompListPage(self.driver)
|
||||
page.distribute_accounting('固定yk')
|
||||
|
||||
# def test_distribute_accounting( self ):
|
||||
# page = CompListPage( self.driver )
|
||||
# page.distribute_accounting( '固定yk' )
|
||||
|
||||
def test_get_comp_name_list( self ):
|
||||
page = CompListPage( self.driver )
|
||||
page.get_comp_name_list()
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
name_text_elem = '//*[@id="body"]/company-list/gyz-inviteuser/div/div/div/div[2]/div[2]/table/tbody/tr/td[1]/ng-select/div/div[2]/span'
|
||||
name_drop_elem = '//*[@id="body"]/company-list/gyz-inviteuser/div/div/div/div[2]/div[2]/table/tbody/tr/td[1]/ng-select'
|
||||
phone_input_elem = '//*[@id="body"]/company-list/gyz-inviteuser/div/div/div/div[2]/div[2]/table/tbody/tr/td[2]/input'
|
||||
delete_btn_elem = '//*[@id="body"]/company-list/gyz-inviteuser/div/div/div/div[2]/div[2]/table/tbody/tr/td[3]/i'
|
||||
|
||||
# 分配窗口
|
||||
name_text_elem = '//*[@id="body"]/company-list/gyz-inviteuser/div/div/div/div[2]/div[2]/table/tbody/tr[1]/td[1]/ng-select/div/div[2]/span/span'
|
||||
phone_text_elem = '//*[@id="body"]/company-list/gyz-inviteuser/div/div/div/div[2]/div[2]/table/tbody/tr/td[2]/input'
|
||||
# ----------------------------------------------------------------------------------------------------------------------
|
||||
# 添加用户窗口
|
||||
name_input_elem = '//*[@id="body"]/company-list/gyz-inviteuser/div/div/div/div[2]/div[2]/table/tbody/tr/td[1]/input'
|
||||
phone_input_elem = '//*[@id="body"]/company-list/gyz-inviteuser/div/div/div/div[2]/div[2]/table/tbody/tr/td[2]/input'
|
||||
|
||||
# 保存按钮xpath
|
||||
save_elem = "//button[@type='submit']"
|
||||
cancel_elem = "//button[@type='button']"
|
||||
save_elem = '//*[@id="body"]/company-list/gyz-inviteuser/div/div/div/div[3]/button[1]'
|
||||
cancel_elem = '//*[@id="body"]/company-list/gyz-inviteuser/div/div/div/div[3]/button[2]'
|
||||
|
||||
|
|
|
@ -4,113 +4,111 @@ import time
|
|||
from .distribute_modal_elem import *
|
||||
from util.public_page import PublicPage
|
||||
from ..comp_list_page import CompListPage
|
||||
from ...navigation.topbar.topbar_page import TopBarPage
|
||||
from ...personal_info_modal.personal_info_modal_page import PersonalInfoModalPage
|
||||
|
||||
|
||||
# @Time :18/1/19 上午11:46
|
||||
# @Author :huangcaiyan
|
||||
# @File : distribute_modal_page
|
||||
# @Software : PyCharm
|
||||
class DistributeModalPage(object):
|
||||
|
||||
def __init__( self, driver ):
|
||||
self.driver = driver
|
||||
# self.driver = webdriver.Chrome()
|
||||
|
||||
def distribute_current_user( self, user_info ):
|
||||
class DistributeModalPage( object ):
|
||||
|
||||
def __init__( self , driver ):
|
||||
self.driver = driver # self.driver = webdriver.Chrome()
|
||||
|
||||
def invite_user( self , user_info ):
|
||||
"""
|
||||
:param user_info: 客户联系人/会计/助理信息(姓名)
|
||||
:return: 分配当前用户为会计/助理
|
||||
:param user_info: 用户名{0:会计/助理/客户联系人,1:帐套名称[当等于current_user时,默认分配当前登陆用户],2:用户名,3:手机号}
|
||||
:return: 选择/邀请用户
|
||||
"""
|
||||
if not self.driver.find_element_by_xpath(name_text_elem).is_displayed():
|
||||
self.click_add_more_link()
|
||||
# current_user_name =
|
||||
self.select_user(user_info[0])
|
||||
self.submit(user_info[2])
|
||||
|
||||
def invite_new_user( self, user_info ):
|
||||
"""
|
||||
:param user_info: 客户联系人/会计/助理信息(姓名、电话)
|
||||
:return: 填写客户联系人,邀请会计/助理
|
||||
"""
|
||||
if not self.driver.find_element_by_xpath(name_text_elem).is_displayed():
|
||||
self.click_add_more_link()
|
||||
self.select_user('+新增用户')
|
||||
time.sleep(1)
|
||||
if self.driver.find_element_by_xpath(name_input_elem).is_displayed():
|
||||
self.set_name(user_info[0])
|
||||
self.set_phone(user_info[1])
|
||||
self.submit(user_info[2])
|
||||
|
||||
def distribute_user( self, user_info ):
|
||||
# compListPage = CompListPage(self.driver)
|
||||
# compListPage.click_distribute_btn()
|
||||
if not self.driver.find_element_by_xpath(name_text_elem).is_displayed():
|
||||
self.click_add_more_link()
|
||||
if self.driver.find_element_by_xpath(name_text_elem) == '':
|
||||
self.select_user('+新增用户')
|
||||
self.set_name(user_info[0])
|
||||
self.set_phone(user_info[1])
|
||||
else:
|
||||
self.select_user(user_info[0])
|
||||
self.submit(user_info[2])
|
||||
|
||||
publicPage = PublicPage( self.driver )
|
||||
topBarPage = TopBarPage( self.driver )
|
||||
compListPage = CompListPage( self.driver )
|
||||
compListPage.click_distribute_btn( user_info[ 0 ] , user_info[ 1 ] )
|
||||
names = self.get_name_list()
|
||||
|
||||
if user_info[ 2 ] in names:
|
||||
self.select_name( user_info[ 2 ] )
|
||||
elif user_info[ 2 ] == 'current_user':
|
||||
current_user = topBarPage.get_login_user_name()
|
||||
self.select_name( current_user )
|
||||
elif user_info[ 3 ] not in self.get_phone_list():
|
||||
drop_loc = self.driver.find_element_by_xpath( name_drop_elem )
|
||||
publicPage.click_elem( drop_loc )
|
||||
name_loc = self.driver.find_element_by_partial_link_text( '+新增用户' )
|
||||
publicPage.click_elem( name_loc )
|
||||
self.set_name( user_info[ 0 ] )
|
||||
self.set_phone( user_info[ 1 ] )
|
||||
self.submit( 'save' )
|
||||
|
||||
# ------------------------------------------------------------------------------------------------------------------
|
||||
def select_user( self, name ):
|
||||
"""
|
||||
:param name: 姓名;选择新增用户(name=+新增用户);
|
||||
:return:点击姓名下拉可选值
|
||||
"""
|
||||
publicPage = PublicPage(self.driver)
|
||||
drop_loc = self.driver.find_element_by_xpath(name_drop_elem)
|
||||
publicPage.select_dropdown_item(drop_loc, name)
|
||||
|
||||
|
||||
def get_name_list( self ):
|
||||
publicPage = PublicPage(self.driver)
|
||||
# self.driver.find_element_by_xpath(name_text_elem).click()
|
||||
drop_loc = self.driver.find_element_by_xpath(name_drop_elem)
|
||||
publicPage.click_elem(drop_loc)
|
||||
name_locs = drop_loc.find_element_by_css_selector('.dropdown-menu').find_elements_by_tag_name('li')
|
||||
name_len = len(name_locs)
|
||||
print('name_len=', name_len)
|
||||
names = []
|
||||
for name_index in range(name_len):
|
||||
name_xpath = 'li[' + str(name_index) + ']/div/a/div/div'
|
||||
print('name_xpath=>',name_xpath)
|
||||
name_loc = self.driver.find_element_by_css_selector('.dropdown-menu').find_element_by_xpath(name_xpath)
|
||||
name = name_loc.text
|
||||
print('name=>', name)
|
||||
names.append(name)
|
||||
print('names1==', names)
|
||||
print('names=', names)
|
||||
"""
|
||||
:return: 返回已经邀请过的用户名
|
||||
"""
|
||||
publicPage = PublicPage( self.driver )
|
||||
drop_loc = self.driver.find_element_by_xpath( name_drop_elem )
|
||||
publicPage.click_elem( drop_loc )
|
||||
names_loc = self.driver.find_element_by_tag_name( 'ul' ).find_elements_by_tag_name( 'li' )
|
||||
names = [ ]
|
||||
for name_loc in names_loc:
|
||||
name = name_loc.find_element_by_xpath( 'div/a/div[2]' ).text
|
||||
names.append( name )
|
||||
print( names )
|
||||
return names
|
||||
|
||||
def set_name( self, name ):
|
||||
|
||||
def get_phone_list( self ):
|
||||
"""
|
||||
:return: 返回已经邀请过的手机号
|
||||
"""
|
||||
phones = [ ]
|
||||
names = self.get_name_list()
|
||||
for name in names:
|
||||
if names.index( name ) != 0:
|
||||
self.select_name( name )
|
||||
phone_loc = self.driver.find_element_by_xpath( phone_text_elem )
|
||||
phone = phone_loc.get_attribute( 'value' )
|
||||
phones.append( phone )
|
||||
print( 'phones=' , phones )
|
||||
return phones
|
||||
|
||||
def set_name( self , name ):
|
||||
"""
|
||||
:param name: 姓名
|
||||
:return:输入姓名
|
||||
"""
|
||||
publicPage = PublicPage(self.driver)
|
||||
input_loc = self.driver.find_element_by_xpath(name_input_elem)
|
||||
publicPage.set_value(input_loc, name)
|
||||
|
||||
def set_phone( self, phone_num ):
|
||||
publicPage = PublicPage( self.driver )
|
||||
input_loc = self.driver.find_element_by_xpath( name_input_elem )
|
||||
publicPage.set_value( input_loc , name )
|
||||
|
||||
def set_phone( self , phone_num ):
|
||||
"""
|
||||
:param phone_num: 手机号
|
||||
:return:输入手机号
|
||||
"""
|
||||
publicPage = PublicPage(self.driver)
|
||||
input_loc = self.driver.find_element_by_xpath(phone_input_elem)
|
||||
publicPage.set_value(input_loc, phone_num)
|
||||
|
||||
publicPage = PublicPage( self.driver )
|
||||
input_loc = self.driver.find_element_by_xpath( phone_input_elem )
|
||||
publicPage.set_value( input_loc , phone_num )
|
||||
|
||||
def click_add_more_link( self ):
|
||||
"""
|
||||
:return: 点击继续添加
|
||||
"""
|
||||
publicPage = PublicPage(self.driver)
|
||||
link_loc = self.driver.find_element_by_partial_link_text('继续添加')
|
||||
publicPage.click_elem(link_loc)
|
||||
|
||||
def submit( self, btn_name ):
|
||||
publicPage = PublicPage( self.driver )
|
||||
link_loc = self.driver.find_element_by_partial_link_text( '继续添加' )
|
||||
publicPage.click_elem( link_loc )
|
||||
|
||||
def select_name( self , user_name ):
|
||||
publicPage = PublicPage( self.driver )
|
||||
names = self.get_name_list()
|
||||
name_index = names.index( user_name )
|
||||
name_loc = self.driver.find_element_by_tag_name( 'ul' ).find_elements_by_tag_name( 'li' )[
|
||||
name_index ].find_element_by_xpath( 'div/a/div[2]' )
|
||||
publicPage.click_elem( name_loc )
|
||||
|
||||
def submit( self , btn_name ):
|
||||
"""
|
||||
:param btn_name: 按钮名称,可选值(save,cancel)
|
||||
:return:点击保存、取消按钮
|
||||
|
@ -119,22 +117,6 @@ class DistributeModalPage(object):
|
|||
submit_elem = save_elem
|
||||
elif btn_name == 'cancel':
|
||||
submit_elem = cancel_elem
|
||||
publicPage = PublicPage(self.driver)
|
||||
btn_loc = self.driver.find_element_by_xpath(submit_elem)
|
||||
publicPage.click_elem(btn_loc)
|
||||
|
||||
# class Test(unittest.TestCase):
|
||||
# @classmethod
|
||||
# def setUpClass( self ):
|
||||
# self.driver = webdriver.Chrome()
|
||||
# self.driver.implicitly_wait(30)
|
||||
#
|
||||
# loginPage = LoginPage()
|
||||
#
|
||||
# @classmethod
|
||||
# def tearDownClass( self ):
|
||||
# self.driver.quit()
|
||||
#
|
||||
# def test_get_name_list( self ):
|
||||
# page = DistributeModalPage(self.driver)
|
||||
# page
|
||||
publicPage = PublicPage( self.driver )
|
||||
btn_loc = self.driver.find_element_by_xpath( submit_elem )
|
||||
return publicPage.click_elem( btn_loc )
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from selenium import webdriver
|
||||
import unittest, time
|
||||
import unittest , time
|
||||
|
||||
from .distribute_modal_page import DistributeModalPage
|
||||
from comp_info import CompInfo
|
||||
|
@ -7,43 +7,68 @@ from util.public_page import PublicPage
|
|||
# from util.enter_comp_page import EnterCompPage
|
||||
from ....login.login_page import LoginPage
|
||||
from ..comp_list_page import CompListPage
|
||||
from ...navigation.topbar.topbar_page import TopBarPage
|
||||
|
||||
|
||||
# @Time :18/1/19 上午11:46
|
||||
# @Author :huangcaiyan
|
||||
# @File : distribute_modal_spec
|
||||
# @Software : PyCharm
|
||||
class DistributeModalSpec(unittest.TestCase):
|
||||
user_info = ['huangcaiyan0714', '13683139989', ]
|
||||
|
||||
class DistributeModalSpec( unittest.TestCase ):
|
||||
user_info = [ '小芳' , '13683139980' , ]
|
||||
|
||||
@classmethod
|
||||
def setUpClass( self ):
|
||||
self.driver = webdriver.Chrome()
|
||||
global publicPage
|
||||
publicPage = PublicPage(self.driver)
|
||||
publicPage = PublicPage( self.driver )
|
||||
publicPage.max_window()
|
||||
self.driver.implicitly_wait(30)
|
||||
|
||||
loginPage = LoginPage(CompInfo.BASE_URL, self.driver)
|
||||
loginPage.login(CompInfo.LOGIN_DATA)
|
||||
|
||||
self.driver.implicitly_wait( 30 )
|
||||
|
||||
loginPage = LoginPage( CompInfo.BASE_URL , self.driver )
|
||||
loginPage.login( CompInfo.LOGIN_DATA )
|
||||
|
||||
@classmethod
|
||||
def tearDownClass( self ):
|
||||
self.driver.quit()
|
||||
|
||||
|
||||
#
|
||||
def test_distribute_accounting( self ):
|
||||
compListPage = CompListPage(self.driver)
|
||||
page = DistributeModalPage(self.driver)
|
||||
compListPage.click_distribute_btn('北京第一村', '会计')
|
||||
time.sleep(5)
|
||||
|
||||
page.get_name_list()
|
||||
|
||||
def test_distribute_current_user_accounting( self ):
|
||||
compListPage = CompListPage(self.driver)
|
||||
page = DistributeModalPage(self.driver)
|
||||
compListPage.click_distribute_btn('北京第一村', '会计')
|
||||
page.distribute_user()
|
||||
compListPage = CompListPage( self.driver )
|
||||
page = DistributeModalPage( self.driver )
|
||||
compListPage.click_distribute_btn( '会计','北京第一村' )
|
||||
page.invite_user( self.user_info )
|
||||
time.sleep( 5 )
|
||||
|
||||
|
||||
# page.get_name_list()
|
||||
#
|
||||
# def test_distribute_current_user_accounting( self ):
|
||||
# compListPage = CompListPage(self.driver)
|
||||
# page = DistributeModalPage(self.driver)
|
||||
# compListPage.click_distribute_btn('北京第一村', '会计')
|
||||
# topBarPage = TopBarPage(self.driver)
|
||||
# current_user_name = topBarPage.get_login_user_name()
|
||||
#
|
||||
# page.select_user(current_user_name)
|
||||
# page.submit('save')
|
||||
# time.sleep(2)
|
||||
#
|
||||
# def test_get_user_list( self ):
|
||||
# compListPage = CompListPage(self.driver)
|
||||
# page = DistributeModalPage(self.driver)
|
||||
# compListPage.click_distribute_btn('北京第一村', '会计')
|
||||
# page.get_name_list()
|
||||
|
||||
# def test_get_phone_list( self ):
|
||||
# compListPage = CompListPage( self.driver )
|
||||
# page = DistributeModalPage( self.driver )
|
||||
# compListPage.click_distribute_btn( '北京第一村' , '会计' )
|
||||
# page.get_phone_list()
|
||||
|
||||
#
|
||||
|
||||
# def test_write_excel( self ): # """测试""" # file_name = 'data.xlsx' # topBarPage = TopBarPage(self.driver) # current_user_name = topBarPage.get_login_user_name() # topBarPage.write_data(current_user_name, file_name)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -51,7 +51,6 @@ class CreateCompPage(object):
|
|||
self.select_comp_address(create_comp_info[13], create_comp_info[14], create_comp_info[15])
|
||||
self.submit(create_comp_info[16])
|
||||
time.sleep(1)
|
||||
|
||||
else:
|
||||
print('--点击填写按钮失败,填写帐套信息窗口未打开!!')
|
||||
else:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from selenium import webdriver
|
||||
import unittest, time
|
||||
import unittest , time
|
||||
from .create_comp_page import CreateCompPage
|
||||
from util.read_excel import ReadExcel
|
||||
from util.public_page import PublicPage
|
||||
|
@ -15,104 +15,107 @@ caicai
|
|||
'''
|
||||
|
||||
|
||||
class CreateCompSpec(unittest.TestCase):
|
||||
class CreateCompSpec( unittest.TestCase ):
|
||||
create_comp_data_dir = './test_data/cai/external/创建帐套测试数据.xlsx'
|
||||
|
||||
|
||||
@classmethod
|
||||
def setUpClass( self ):
|
||||
self.driver = webdriver.Chrome()
|
||||
# self.driver = webdriver.PhantomJS()
|
||||
self.driver.implicitly_wait(30)
|
||||
PublicPage(self.driver).max_window()
|
||||
self.driver.implicitly_wait( 30 )
|
||||
PublicPage( self.driver ).max_window()
|
||||
self.driver.maximize_window()
|
||||
|
||||
loginPage = LoginPage(CompInfo.BASE_URL, self.driver)
|
||||
loginPage.login(CompInfo.LOGIN_DATA)
|
||||
|
||||
|
||||
loginPage = LoginPage( CompInfo.BASE_URL , self.driver )
|
||||
loginPage.login( CompInfo.LOGIN_DATA )
|
||||
|
||||
@classmethod
|
||||
def tearDownClass( self ):
|
||||
self.driver.quit()
|
||||
|
||||
|
||||
def test_verify_create_comp( self ):
|
||||
"""确认创建帐套功能,创建成功"""
|
||||
page = CreateCompPage(self.driver)
|
||||
readExcel = ReadExcel(self.create_comp_data_dir)
|
||||
comp_data = readExcel.get_value_by_row('创建帐套测试数据', 1)
|
||||
compLisPage = CompListPage(self.driver)
|
||||
page = CreateCompPage( self.driver )
|
||||
readExcel = ReadExcel( self.create_comp_data_dir )
|
||||
comp_data = readExcel.get_value_by_row( '创建帐套测试数据' , 1 )
|
||||
compLisPage = CompListPage( self.driver )
|
||||
comp_name_list_len = len( compLisPage.get_comp_name_list() )
|
||||
compLisPage.go_to_create_comp_page()
|
||||
if 'create-company' in self.driver.current_url:
|
||||
page.set_comp_base_info(comp_data)
|
||||
page.set_comp_detail_info(comp_data)
|
||||
time.sleep(2)
|
||||
self.assertIn('company-list', self.driver.current_url)
|
||||
page.set_comp_base_info( comp_data )
|
||||
page.set_comp_detail_info( comp_data )
|
||||
time.sleep( 2 )
|
||||
new_comp_name_list_len = len( compLisPage.get_comp_name_list() )
|
||||
self.assertIn( 'company-list' , self.driver.current_url )
|
||||
self.assertEqual( comp_name_list_len + 1 , new_comp_name_list_len )
|
||||
else:
|
||||
print('去创建帐套失败!')
|
||||
self.assertEqual(0, 1)
|
||||
|
||||
print( '去创建帐套失败!' )
|
||||
self.assertEqual( 0 , 1 )
|
||||
|
||||
def test_create_comp_empty_comp_name( self ):
|
||||
"""创建帐套-帐套名称为空,红框提醒保存失败"""
|
||||
page = CreateCompPage(self.driver)
|
||||
dangerPage = DangerPage(self.driver)
|
||||
compLisPage = CompListPage(self.driver)
|
||||
readExcel = ReadExcel(self.create_comp_data_dir)
|
||||
|
||||
comp_data = readExcel.get_value_by_row('创建帐套测试数据', 2)
|
||||
page = CreateCompPage( self.driver )
|
||||
dangerPage = DangerPage( self.driver )
|
||||
compLisPage = CompListPage( self.driver )
|
||||
readExcel = ReadExcel( self.create_comp_data_dir )
|
||||
|
||||
comp_data = readExcel.get_value_by_row( '创建帐套测试数据' , 2 )
|
||||
compLisPage.go_to_create_comp_page()
|
||||
if 'create-company' in self.driver.current_url:
|
||||
page.set_comp_base_info(comp_data)
|
||||
page.submit(comp_data[17])
|
||||
page.set_comp_base_info( comp_data )
|
||||
page.submit( comp_data[ 17 ] )
|
||||
alert_danger_msg = dangerPage.get_alert_danger_msg()
|
||||
self.assertEqual(alert_danger_msg, comp_data[19])
|
||||
time.sleep(2)
|
||||
self.assertNotIn('company-list', self.driver.current_url)
|
||||
self.assertEqual( alert_danger_msg , comp_data[ 19 ] )
|
||||
time.sleep( 2 )
|
||||
self.assertNotIn( 'company-list' , self.driver.current_url )
|
||||
else:
|
||||
print('去创建帐套失败!')
|
||||
self.assertEqual(0, 1)
|
||||
|
||||
print( '去创建帐套失败!' )
|
||||
self.assertEqual( 0 , 1 )
|
||||
|
||||
def test_create_comp_empty_legal_person( self ):
|
||||
"""创建帐套-公司性质为空,红框提醒,保存失败"""
|
||||
page = CreateCompPage(self.driver)
|
||||
publicPage = PublicPage(self.driver)
|
||||
readExcel = ReadExcel(self.create_comp_data_dir)
|
||||
excel_date = readExcel.get_value_by_row('创建帐套测试数据', 3)
|
||||
page = CreateCompPage( self.driver )
|
||||
publicPage = PublicPage( self.driver )
|
||||
readExcel = ReadExcel( self.create_comp_data_dir )
|
||||
excel_date = readExcel.get_value_by_row( '创建帐套测试数据' , 3 )
|
||||
for comp_data in excel_date:
|
||||
page.set_comp_base_info(comp_data)
|
||||
page.set_comp_base_info( comp_data )
|
||||
result = publicPage.has_danger_is_show()
|
||||
self.assertEqual(result, 1)
|
||||
self.assertNotIn('company-list', self.driver.current_url)
|
||||
|
||||
self.assertEqual( result , 1 )
|
||||
self.assertNotIn( 'company-list' , self.driver.current_url )
|
||||
|
||||
def test_create_comp_not_type_comp_detail_info( self ):
|
||||
"""创建帐套-帐套详细信息不填写,保存失败,红框提醒"""
|
||||
page = CreateCompPage(self.driver)
|
||||
publicPage = PublicPage(self.driver)
|
||||
read_excel = ReadExcel(self.create_comp_data_dir)
|
||||
excel_data = read_excel.get_value_by_row('创建帐套测试数据', 4)
|
||||
page = CreateCompPage( self.driver )
|
||||
publicPage = PublicPage( self.driver )
|
||||
read_excel = ReadExcel( self.create_comp_data_dir )
|
||||
excel_data = read_excel.get_value_by_row( '创建帐套测试数据' , 4 )
|
||||
for comp_data in excel_data:
|
||||
page.set_comp_base_info(comp_data)
|
||||
page.set_comp_detail_info(comp_data)
|
||||
page.set_comp_base_info( comp_data )
|
||||
page.set_comp_detail_info( comp_data )
|
||||
result = publicPage.has_danger_is_show()
|
||||
self.assertEqual(result, 1)
|
||||
self.assertNotIn('company-list', self.driver.current_url)
|
||||
|
||||
self.assertEqual( result , 1 )
|
||||
self.assertNotIn( 'company-list' , self.driver.current_url )
|
||||
|
||||
def test_create_comp_empty_legal_person( self ):
|
||||
"""创建帐套-成立日期为空,红框提醒,保存失败"""
|
||||
page = CreateCompPage(self.driver)
|
||||
publicPage = PublicPage(self.driver)
|
||||
readExcel = ReadExcel(self.create_comp_data_dir)
|
||||
excel_date = readExcel.get_value_by_row('创建帐套测试数据', 5)
|
||||
page = CreateCompPage( self.driver )
|
||||
publicPage = PublicPage( self.driver )
|
||||
readExcel = ReadExcel( self.create_comp_data_dir )
|
||||
excel_date = readExcel.get_value_by_row( '创建帐套测试数据' , 5 )
|
||||
for comp_data in excel_date:
|
||||
page.set_comp_base_info(comp_data)
|
||||
page.set_comp_detail_info(comp_data)
|
||||
page.set_comp_base_info( comp_data )
|
||||
page.set_comp_detail_info( comp_data )
|
||||
result = publicPage.has_danger_is_show()
|
||||
self.assertEqual(result, 1)
|
||||
self.assertNotIn('company-list', self.driver.current_url)
|
||||
self.assertEqual( result , 1 )
|
||||
self.assertNotIn( 'company-list' , self.driver.current_url )
|
||||
|
||||
|
||||
if __name__ == '_main_':
|
||||
# unittest.main()
|
||||
suite = unittest.TestSuite()
|
||||
suite.addTest(CreateCompSpec('test_confirm_create_account_book'))
|
||||
|
||||
suite.addTest( CreateCompSpec( 'test_confirm_create_account_book' ) )
|
||||
|
||||
# 执行测试
|
||||
runner = unittest.TextTestRunner()
|
||||
runner.run(suite)
|
||||
runner.run( suite )
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
from selenium import webdriver
|
||||
import unittest
|
||||
import time
|
||||
import time, xlwt, xlrd
|
||||
from xlutils.copy import copy
|
||||
from xlwt import Style
|
||||
from openpyxl import load_workbook
|
||||
|
||||
from util.public_page import PublicPage
|
||||
from .topbar_elem import *
|
||||
|
@ -56,6 +59,29 @@ class TopBarPage:
|
|||
link_loc = self.driver.find_element_by_link_text('退出')
|
||||
publicPage.click_elem(link_loc)
|
||||
|
||||
@staticmethod
|
||||
def write_data( data, file_name ):
|
||||
# file_dir = './test_data/cai/external/external_data.xlsx'
|
||||
work_book = load_workbook(file_name)
|
||||
work_sheet = work_book.get_sheet_by_name('会计分配')
|
||||
work_sheet['A2'] = data
|
||||
work_book.save(file_name)
|
||||
|
||||
@staticmethod
|
||||
def write_excel( row, col, string, style=Style.default_style ):
|
||||
"""
|
||||
:param row:行索引
|
||||
:param col:列索引
|
||||
:param string:写入的内容
|
||||
:param style:样式
|
||||
:return:将数据写入指定的excel中
|
||||
"""
|
||||
rb = xlrd.open_workbook('./test_data/cai/external/external_data.xlsx')
|
||||
work_book = copy(rb)
|
||||
work_sheet = work_book.get_sheet(1)
|
||||
work_sheet.write(row, col, string, style)
|
||||
work_book.save('./test_data/cai/external/external_data.xlsx')
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
# 进入帐套页面
|
||||
def get_comp_name( self ):
|
||||
|
|
|
@ -29,24 +29,26 @@ class TopBarSpec(unittest.TestCase):
|
|||
@classmethod
|
||||
def tearDownClass( self ):
|
||||
self.driver.quit()
|
||||
#
|
||||
# def test_get_current_period( self ):
|
||||
# """测试 获取当前会计期间"""
|
||||
# page = TopBarPage(self.driver)
|
||||
# current_accounting_period = page.get_current_accounting_period('period')
|
||||
# self.assertIn('2017-12', current_accounting_period)
|
||||
#
|
||||
# def test_get_current_comp_statue( self ):
|
||||
# """测试 获取当前帐套状态"""
|
||||
# page = TopBarPage(self.driver)
|
||||
# current_accounting_period = page.get_current_accounting_period('statue')
|
||||
# self.assertIn('进行中', current_accounting_period)
|
||||
# time.sleep()
|
||||
#
|
||||
# def test_get_operation_item( self ):
|
||||
# """测试 获取操作按钮下拉可选值"""
|
||||
# page = TopBarPage(self.driver)
|
||||
# page.click_operation_btn('过帐')
|
||||
|
||||
def test_get_current_period( self ):
|
||||
"""测试 获取当前会计期间"""
|
||||
page = TopBarPage(self.driver)
|
||||
current_accounting_period = page.get_current_accounting_period('period')
|
||||
self.assertIn('2017-12', current_accounting_period)
|
||||
|
||||
def test_get_current_comp_statue( self ):
|
||||
"""测试 获取当前帐套状态"""
|
||||
page = TopBarPage(self.driver)
|
||||
current_accounting_period = page.get_current_accounting_period('statue')
|
||||
self.assertIn('进行中', current_accounting_period)
|
||||
time.sleep()
|
||||
|
||||
def test_get_operation_item( self ):
|
||||
"""测试 获取操作按钮下拉可选值"""
|
||||
page = TopBarPage(self.driver)
|
||||
page.click_operation_btn('过帐')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
@ -12,60 +12,67 @@ from ..comp_list.comp_list_page import CompListPage
|
|||
# @Software : PyCharm
|
||||
|
||||
class PersonalInfoModalPage:
|
||||
|
||||
def __init__( self, driver ):
|
||||
self.driver = driver
|
||||
# self.driver = webdriver.Chrome()
|
||||
|
||||
def modify_password( self, data ):
|
||||
compListPage = CompListPage(self.driver)
|
||||
|
||||
def __init__( self , driver ):
|
||||
self.driver = driver # self.driver = webdriver.Chrome()
|
||||
|
||||
def modify_password( self , data ):
|
||||
compListPage = CompListPage( self.driver )
|
||||
compListPage.click_modify_password_link()
|
||||
WebDriverWait(self.driver, 30, 1).until(
|
||||
lambda driver: self.driver.find_element_by_css_selector(modal_title_elem))
|
||||
self.set_old_password(data[0])
|
||||
self.set_new_password(data[1])
|
||||
self.set_confirm_password(data[2])
|
||||
self.submit(data[3])
|
||||
|
||||
WebDriverWait( self.driver , 30 , 1 ).until(
|
||||
lambda driver: self.driver.find_element_by_css_selector( modal_title_elem ) )
|
||||
self.set_old_password( data[ 0 ] )
|
||||
self.set_new_password( data[ 1 ] )
|
||||
self.set_confirm_password( data[ 2 ] )
|
||||
self.submit( data[ 3 ] )
|
||||
|
||||
# -------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
def get_modal_title( self ):
|
||||
"""
|
||||
获取modal框标题
|
||||
:return:标题(个人信息)
|
||||
"""
|
||||
publicPage = PublicPage(self.driver)
|
||||
title_loc = self.driver.find_element_by_css_selector(modal_title_elem)
|
||||
publicPage.get_value(title_loc)
|
||||
|
||||
def set_old_password( self, old_password ):
|
||||
publicPage = PublicPage( self.driver )
|
||||
title_loc = self.driver.find_element_by_css_selector( modal_title_elem )
|
||||
publicPage.get_value( title_loc )
|
||||
|
||||
def get_phone_num( self ):
|
||||
"""
|
||||
:return:获取当前用户的手机号
|
||||
"""
|
||||
publicPage = PublicPage( self.driver )
|
||||
num_loc = self.driver.find_element_by_id( phone_elem )
|
||||
publicPage.get_value( num_loc )
|
||||
|
||||
def set_old_password( self , old_password ):
|
||||
"""
|
||||
输入原密码
|
||||
:param old_password: 原密码
|
||||
"""
|
||||
publicPage = PublicPage(self.driver)
|
||||
input_loc = self.driver.find_element_by_name(old_password_elem)
|
||||
publicPage.set_value(input_loc, old_password)
|
||||
|
||||
def set_new_password( self, new_password ):
|
||||
publicPage = PublicPage( self.driver )
|
||||
input_loc = self.driver.find_element_by_name( old_password_elem )
|
||||
publicPage.set_value( input_loc , old_password )
|
||||
|
||||
def set_new_password( self , new_password ):
|
||||
"""
|
||||
设置新密码
|
||||
:param new_password: 新密码
|
||||
"""
|
||||
publicPage = PublicPage(self.driver)
|
||||
input_loc = self.driver.find_element_by_name(new_password_elem)
|
||||
publicPage.set_value(input_loc, new_password)
|
||||
|
||||
def set_confirm_password( self, confirm_password ):
|
||||
publicPage = PublicPage( self.driver )
|
||||
input_loc = self.driver.find_element_by_name( new_password_elem )
|
||||
publicPage.set_value( input_loc , new_password )
|
||||
|
||||
def set_confirm_password( self , confirm_password ):
|
||||
"""
|
||||
设置确认密码
|
||||
:param confirm_password: 确认密码
|
||||
"""
|
||||
publicPage = PublicPage(self.driver)
|
||||
input_loc = self.driver.find_element_by_name(confirm_password_elem)
|
||||
publicPage.set_value(input_loc, confirm_password)
|
||||
|
||||
def submit( self, btn_name ):
|
||||
publicPage = PublicPage( self.driver )
|
||||
input_loc = self.driver.find_element_by_name( confirm_password_elem )
|
||||
publicPage.set_value( input_loc , confirm_password )
|
||||
|
||||
def submit( self , btn_name ):
|
||||
"""
|
||||
点击保存或取消按钮
|
||||
:param btn_name: 按钮名称,可选值(save,cancel)
|
||||
|
@ -78,8 +85,8 @@ class PersonalInfoModalPage:
|
|||
operation_name = '取消'
|
||||
else:
|
||||
btn_elem = None
|
||||
print('按钮名称输入错误,请检查输入值。')
|
||||
print('正在做' + operation_name + '修改的操作:')
|
||||
publicPage = PublicPage(self.driver)
|
||||
btn_loc = self.driver.find_element_by_id(btn_elem)
|
||||
publicPage.click_elem(btn_loc)
|
||||
print( '按钮名称输入错误,请检查输入值。' )
|
||||
print( '正在做' + operation_name + '修改的操作:' )
|
||||
publicPage = PublicPage( self.driver )
|
||||
btn_loc = self.driver.find_element_by_id( btn_elem )
|
||||
publicPage.click_elem( btn_loc )
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -188,7 +188,6 @@ class CreateCompay(object):
|
|||
self.driver.quit()
|
||||
logging.exception(e)
|
||||
sys.exit()
|
||||
# //*[@id="body"]/company-list/gyz-inviteuser/div/div/div/div[2]/div[2]/table/tbody/tr/td[1]/input
|
||||
|
||||
#进入创建账户页面
|
||||
def goToCreateAccountPage(self,baseUrl):
|
||||
|
|
|
@ -43,7 +43,6 @@ class PublicPage:
|
|||
"""
|
||||
is_disapeared = WebDriverWait(self.driver, 30, 1).until_not(
|
||||
lambda x: self.driver.find_element_by_css_selector('.loader').is_displayed())
|
||||
print('is_disapeared=>', is_disapeared)
|
||||
return is_disapeared
|
||||
|
||||
def wait_until_svg_disapeared( self ):
|
||||
|
@ -222,14 +221,10 @@ class PublicPage:
|
|||
:return: 点击元素
|
||||
"""
|
||||
try:
|
||||
# count = 1
|
||||
if not self.wait_until_loader_disapeared():
|
||||
self.scroll_to_elem(elem_loc)
|
||||
# WebDriverWait(self.driver, 30, 1).until(lambda driver: elem_loc)
|
||||
return elem_loc.click()
|
||||
else:
|
||||
# count = count + 1
|
||||
# print('[PublicPage]--加载蒙板未消失--点击失败!,继续第' + count + '次点击:')
|
||||
time.sleep(1)
|
||||
self.scroll_to_elem(elem_loc)
|
||||
return elem_loc.click()
|
||||
|
@ -321,7 +316,6 @@ class PublicPage:
|
|||
try:
|
||||
self.scroll_to_elem(elem_loc)
|
||||
text_value = elem_loc.text
|
||||
print(text_value)
|
||||
return text_value
|
||||
except NoSuchElementException as e:
|
||||
logging.error('[PublicPage]get_value--查找元素不存在,异常堆栈信息是:', str(traceback.format_exc()))
|
||||
|
|
Loading…
Reference in New Issue