change to python3

Signed-off-by: hanzhichao <han_zhichao@sina.cn>
This commit is contained in:
hanzhichao 2017-10-31 19:20:14 +08:00
parent 7a277972e6
commit 9bc46cf422
49 changed files with 1733 additions and 343 deletions

View File

@ -0,0 +1,3 @@
<component name="ProjectDictionaryState">
<dictionary name="Administrator" />
</component>

6
.idea/encodings.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" native2AsciiForPropertiesFiles="true" defaultCharsetForPropertiesFiles="UTF-8">
<file url="PROJECT" charset="UTF-8" />
</component>
</project>

View File

@ -0,0 +1,15 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredPackages">
<value>
<list size="2">
<item index="0" class="java.lang.String" itemvalue="xlrd" />
<item index="1" class="java.lang.String" itemvalue="kkbb" />
</list>
</value>
</option>
</inspection_tool>
</profile>
</component>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 2.7.12 (/usr/bin/python2.7)" project-jdk-type="Python SDK" />
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.6.3 (E:\Program Files (x86)\Python3.6.3\python.exe)" project-jdk-type="Python SDK" />
</project>

6
.idea/preferred-vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PreferredVcsStorage">
<preferredVcsName>ApexVCS</preferredVcsName>
</component>
</project>

View File

@ -2,7 +2,7 @@
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="jdk" jdkName="Python 3.6.3 (E:\Program Files (x86)\Python3.6.3\python.exe)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TestRunnerService">

View File

@ -1,28 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="c4051f0c-bcae-438d-9a4b-fba6b18599e4" name="Default" comment="">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/vcs.xml" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/util/e_mail.py" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/util/log.py" />
<change type="DELETED" beforePath="$PROJECT_DIR$/conf/page_elm/ccustomer.ini" afterPath="" />
<change type="DELETED" beforePath="$PROJECT_DIR$/conf/page_elm/login.ini" afterPath="" />
<change type="DELETED" beforePath="$PROJECT_DIR$/conf/page_elm/page.ini" afterPath="" />
<change type="DELETED" beforePath="$PROJECT_DIR$/log/log.log" afterPath="" />
<change type="DELETED" beforePath="$PROJECT_DIR$/page_obj/__init__.py" afterPath="" />
<change type="DELETED" beforePath="$PROJECT_DIR$/page_obj/ccustomer.py" afterPath="" />
<change type="DELETED" beforePath="$PROJECT_DIR$/page_obj/login.py" afterPath="" />
<change type="DELETED" beforePath="$PROJECT_DIR$/page_obj/page.py" afterPath="" />
<change type="DELETED" beforePath="$PROJECT_DIR$/util/email.py" afterPath="" />
<change type="MOVED" beforePath="$PROJECT_DIR$/testcase/__init__.py" afterPath="$PROJECT_DIR$/test_case/__init__.py" />
<change type="MOVED" beforePath="$PROJECT_DIR$/testcase/base.py" afterPath="$PROJECT_DIR$/test_case/base.py" />
<change type="MOVED" beforePath="$PROJECT_DIR$/testcase/test.py" afterPath="$PROJECT_DIR$/test_case/test.py" />
<change type="MOVED" beforePath="$PROJECT_DIR$/testcase/test_ccustomer.py" afterPath="$PROJECT_DIR$/test_case/test_ccustomer.py" />
<change type="MOVED" beforePath="$PROJECT_DIR$/util/data.py" afterPath="$PROJECT_DIR$/util/file.py" />
<list default="true" id="85a794d2-3f52-4373-9706-ee8adb5562ca" name="New changelist" comment="">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/dictionaries/Administrator.xml" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/encodings.xml" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/inspectionProfiles/Project_Default.xml" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/inspectionProfiles/profiles_settings.xml" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/page/page_obj/logistics/__init__.py" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/page/page_obj/logistics/wdeliveryer.py" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/util/born.py" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/util/header.txt" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/util/locate.py" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/util/mark.py" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/util/monkey.py" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/util/page_elm.tpl" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/util/page_obj.tpl" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/util/runtime.py" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/util/spider.py" />
<change type="DELETED" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="" />
<change type="MOVED" beforePath="$PROJECT_DIR$/util/method.py" afterPath="$PROJECT_DIR$/page/page_elm/logistics/wdeliveryer.ini" />
<change type="MOVED" beforePath="$PROJECT_DIR$/util/util.py" afterPath="$PROJECT_DIR$/util/root.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/driver/chromedriver" afterPath="$PROJECT_DIR$/driver/chromedriver" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/misc.xml" afterPath="$PROJECT_DIR$/.idea/misc.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/ui_checker.iml" afterPath="$PROJECT_DIR$/.idea/ui_checker.iml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/README.md" afterPath="$PROJECT_DIR$/README.md" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/conf/default.conf" afterPath="$PROJECT_DIR$/conf/default.conf" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/page/page.py" afterPath="$PROJECT_DIR$/page/page.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/page/page_elm/customer/ccustomer.ini" afterPath="$PROJECT_DIR$/page/page_elm/customer/ccustomer.ini" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/page/page_obj/customer/ccustomer.py" afterPath="$PROJECT_DIR$/page/page_obj/customer/ccustomer.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/page/page_obj/customer/ccustomer2.py" afterPath="$PROJECT_DIR$/page/page_obj/customer/ccustomer2.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/page/page_obj/login/login.py" afterPath="$PROJECT_DIR$/page/page_obj/login/login.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/requirements.txt" afterPath="$PROJECT_DIR$/requirements.txt" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/test_case/base.py" afterPath="$PROJECT_DIR$/test_case/base.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/test_case/test.py" afterPath="$PROJECT_DIR$/test_case/test.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/test_case/test_ccustomer.py" afterPath="$PROJECT_DIR$/test_case/test_ccustomer.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/util/action.py" afterPath="$PROJECT_DIR$/util/action.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/util/browser.py" afterPath="$PROJECT_DIR$/util/browser.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/util/cli.py" afterPath="$PROJECT_DIR$/util/cli.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/util/config.py" afterPath="$PROJECT_DIR$/util/config.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/util/db.py" afterPath="$PROJECT_DIR$/util/db.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/util/decorator.py" afterPath="$PROJECT_DIR$/util/decorator.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/util/e_mail.py" afterPath="$PROJECT_DIR$/util/e_mail.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/util/file.py" afterPath="$PROJECT_DIR$/util/file.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/util/log.py" afterPath="$PROJECT_DIR$/util/log.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/util/report.py" afterPath="$PROJECT_DIR$/util/report.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/util/snapshot.py" afterPath="$PROJECT_DIR$/util/snapshot.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/util/ssh.py" afterPath="$PROJECT_DIR$/util/ssh.py" />
</list>
<list id="c4051f0c-bcae-438d-9a4b-fba6b18599e4" name="Default" comment="" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
@ -31,35 +56,57 @@
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="CoverageDataManager">
<SUITE FILE_PATH="coverage/ui_checker$logging.coverage" NAME="logging Coverage Results" MODIFIED="1509151886086" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/util" />
<SUITE FILE_PATH="coverage/ui_checker$mark.coverage" NAME="mark Coverage Results" MODIFIED="1509894315979" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/util" />
<SUITE FILE_PATH="coverage/ui_checker$log.coverage" NAME="log Coverage Results" MODIFIED="1509153112488" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/util" />
<SUITE FILE_PATH="coverage/ui_checker$ccustomer.coverage" NAME="ccustomer Coverage Results" MODIFIED="1509160518092" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/page/page_obj/customer" />
<SUITE FILE_PATH="coverage/ui_checker$config.coverage" NAME="config Coverage Results" MODIFIED="1509149774141" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/util" />
<SUITE FILE_PATH="coverage/ui_checker$action.coverage" NAME="action Coverage Results" MODIFIED="1509449820717" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/util" />
<SUITE FILE_PATH="coverage/ui_checker$Unittests_for_test_case_test_ccustomer_TestCcustomer.coverage" NAME="Unittests for test_case.test_ccustomer.TestCcustomer Coverage Results" MODIFIED="1509788851395" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/ui_checker$ccustomer2.coverage" NAME="ccustomer2 Coverage Results" MODIFIED="1509188986570" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/page/page_obj/customer" />
<SUITE FILE_PATH="coverage/ui_checker$util.coverage" NAME="util Coverage Results" MODIFIED="1509188463579" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/util" />
<SUITE FILE_PATH="coverage/ui_checker$email.coverage" NAME="email Coverage Results" MODIFIED="1509151879786" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/util" />
<SUITE FILE_PATH="coverage/ui_checker$page.coverage" NAME="page Coverage Results" MODIFIED="1509156569574" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/page" />
<SUITE FILE_PATH="coverage/ui_checker$Unittests_for_test_case_test_ccustomer_TestCcustomer_test_search_customer.coverage" NAME="Unittests for test_case.test_ccustomer.TestCcustomer.test_search_customer Coverage Results" MODIFIED="1509767006165" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/ui_checker$db.coverage" NAME="db Coverage Results" MODIFIED="1509790420871" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/util" />
<SUITE FILE_PATH="coverage/ui_checker$Unittests_for_test_case_test_ccustomer_TestCcustomer_test_search_exist_customer.coverage" NAME="Unittests for test_case.test_ccustomer.TestCcustomer.test_search_exist_customer Coverage Results" MODIFIED="1509800050447" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/ui_checker$born.coverage" NAME="born Coverage Results" MODIFIED="1509889504419" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/util" />
<SUITE FILE_PATH="coverage/ui_checker$logging.coverage" NAME="logging Coverage Results" MODIFIED="1509151886086" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/util" />
<SUITE FILE_PATH="coverage/ui_checker$Unittests_in_test_ccustomer_py.coverage" NAME="Unittests in test_ccustomer.py Coverage Results" MODIFIED="1509780067791" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/ui_checker$wdeliveryer.coverage" NAME="wdeliveryer Coverage Results" MODIFIED="1509888239180" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/page/page_obj/logistics" />
<SUITE FILE_PATH="coverage/ui_checker$ccustomer.coverage" NAME="ccustomer Coverage Results" MODIFIED="1509787414416" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/page/page_obj/customer" />
<SUITE FILE_PATH="coverage/ui_checker$config.coverage" NAME="config Coverage Results" MODIFIED="1509188488908" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/util" />
<SUITE FILE_PATH="coverage/ui_checker$page.coverage" NAME="page Coverage Results" MODIFIED="1509789292746" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/page" />
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="page.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/page/page.py">
<file leaf-file-name="born.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/util/born.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="75">
<caret line="43" column="0" lean-forward="true" selection-start-line="43" selection-start-column="0" selection-end-line="43" selection-end-column="0" />
<state relative-caret-position="840">
<caret line="57" column="16" lean-forward="false" selection-start-line="57" selection-start-column="16" selection-end-line="57" selection-end-column="16" />
<folding>
<element signature="e#26#35#0" expanded="true" />
<element signature="e#288#297#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="login.py" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/page/page_obj/login/login.py">
<file leaf-file-name="page.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/page/page.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="135">
<caret line="9" column="0" lean-forward="true" selection-start-line="9" selection-start-column="0" selection-end-line="9" selection-end-column="0" />
<folding>
<element signature="e#0#31#0" expanded="true" />
</folding>
<state relative-caret-position="450">
<caret line="39" column="40" lean-forward="false" selection-start-line="39" selection-start-column="40" selection-end-line="39" selection-end-column="40" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="README.md" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="FIRST">
<first_editor relative-caret-position="60">
<caret line="4" column="13" lean-forward="false" selection-start-line="4" selection-start-column="13" selection-end-line="4" selection-end-column="13" />
<folding />
</first_editor>
<second_editor />
</state>
</provider>
</entry>
@ -69,14 +116,23 @@
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Python Sign" />
<option value="Python Script" />
<option value="myPython" />
</list>
</option>
</component>
<component name="FindInProjectRecents">
<findStrings>
<find>Exception</find>
<find>print</find>
<find>self.elements</find>
<find>webdriver</find>
</findStrings>
<replaceStrings>
<replace>page_conf</replace>
<replace>dr</replace>
</replaceStrings>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
@ -86,17 +142,40 @@
<list>
<option value="$PROJECT_DIR$/util/email.py" />
<option value="$PROJECT_DIR$/util/send_email.py" />
<option value="$PROJECT_DIR$/util/file.py" />
<option value="$PROJECT_DIR$/util/config.py" />
<option value="$PROJECT_DIR$/util/e_mail.py" />
<option value="$PROJECT_DIR$/util/logging.py" />
<option value="$PROJECT_DIR$/report/log/log.log" />
<option value="$PROJECT_DIR$/conf/default.conf" />
<option value="$PROJECT_DIR$/page/page_elm/customer/ccustomer.ini" />
<option value="$PROJECT_DIR$/util/log.py" />
<option value="$PROJECT_DIR$/page/page_obj/customer/ccustomer.py" />
<option value="$PROJECT_DIR$/page/page.py" />
<option value="$PROJECT_DIR$/page/page_obj/login/login.py" />
<option value="$PROJECT_DIR$/util/util.py" />
<option value="$PROJECT_DIR$/page/page_obj/customer/ccustomer2.py" />
<option value="$PROJECT_DIR$/util/config.py" />
<option value="$PROJECT_DIR$/util/browser.py" />
<option value="$PROJECT_DIR$/util/file.py" />
<option value="$PROJECT_DIR$/conf/default.conf" />
<option value="$PROJECT_DIR$/page/page_obj/customer/ccustomer.py" />
<option value="$PROJECT_DIR$/util/db.py" />
<option value="$PROJECT_DIR$/test_case/test_ccustomer.py" />
<option value="$PROJECT_DIR$/page/page_elm/customer/ccustomer.ini" />
<option value="$PROJECT_DIR$/util/header.txt" />
<option value="$PROJECT_DIR$/util/monkey.py" />
<option value="$PROJECT_DIR$/util/action.py" />
<option value="$PROJECT_DIR$/util/e_mail.py" />
<option value="$PROJECT_DIR$/util/runtime.py" />
<option value="$PROJECT_DIR$/requirements.txt" />
<option value="$PROJECT_DIR$/util/spider.py" />
<option value="$PROJECT_DIR$/page/page.py" />
<option value="$PROJECT_DIR$/page/page_elm/logistics/wdeliveryer.ini" />
<option value="$PROJECT_DIR$/page/page_obj/logistics/wdeliveryer.py" />
<option value="$PROJECT_DIR$/util/page_elm.tpl" />
<option value="$PROJECT_DIR$/util/page_obj.tpl" />
<option value="$PROJECT_DIR$/util/born.py" />
<option value="$PROJECT_DIR$/test_case/base.py" />
<option value="$PROJECT_DIR$/util/decorator.py" />
<option value="$PROJECT_DIR$/util/locate.py" />
<option value="$PROJECT_DIR$/util/snapshot.py" />
<option value="$PROJECT_DIR$/util/mark.py" />
<option value="$PROJECT_DIR$/util/cli.py" />
<option value="$PROJECT_DIR$/README.md" />
</list>
</option>
</component>
@ -107,9 +186,10 @@
<sorting>DEFINITION_ORDER</sorting>
</component>
<component name="ProjectFrameBounds" extendedState="6">
<option name="y" value="30" />
<option name="width" value="1366" />
<option name="height" value="738" />
<option name="x" value="175" />
<option name="y" value="143" />
<option name="width" value="1382" />
<option name="height" value="744" />
</component>
<component name="ProjectInspectionProfilesVisibleTreeState">
<entry key="Project Default">
@ -128,7 +208,7 @@
</entry>
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="true">
<ConfirmationsSetting value="2" id="添加" />
<ConfirmationsSetting value="2" id="Add" />
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1">
@ -145,8 +225,6 @@
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scope" />
<pane id="Scratches" />
<pane id="ProjectPane">
<subPane>
<expand>
@ -159,6 +237,11 @@
<item name="ui_checker" type="462c0819:PsiDirectoryNode" />
<item name="conf" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="ui_checker" type="b2602c69:ProjectViewProjectNode" />
<item name="ui_checker" type="462c0819:PsiDirectoryNode" />
<item name="data" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="ui_checker" type="b2602c69:ProjectViewProjectNode" />
<item name="ui_checker" type="462c0819:PsiDirectoryNode" />
@ -174,14 +257,14 @@
<item name="ui_checker" type="b2602c69:ProjectViewProjectNode" />
<item name="ui_checker" type="462c0819:PsiDirectoryNode" />
<item name="page" type="462c0819:PsiDirectoryNode" />
<item name="page_elm" type="462c0819:PsiDirectoryNode" />
<item name="login" type="462c0819:PsiDirectoryNode" />
<item name="page_obj" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="ui_checker" type="b2602c69:ProjectViewProjectNode" />
<item name="ui_checker" type="462c0819:PsiDirectoryNode" />
<item name="page" type="462c0819:PsiDirectoryNode" />
<item name="page_obj" type="462c0819:PsiDirectoryNode" />
<item name="customer" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="ui_checker" type="b2602c69:ProjectViewProjectNode" />
@ -193,13 +276,7 @@
<path>
<item name="ui_checker" type="b2602c69:ProjectViewProjectNode" />
<item name="ui_checker" type="462c0819:PsiDirectoryNode" />
<item name="report" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="ui_checker" type="b2602c69:ProjectViewProjectNode" />
<item name="ui_checker" type="462c0819:PsiDirectoryNode" />
<item name="report" type="462c0819:PsiDirectoryNode" />
<item name="log" type="462c0819:PsiDirectoryNode" />
<item name="test_case" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="ui_checker" type="b2602c69:ProjectViewProjectNode" />
@ -210,20 +287,23 @@
<select />
</subPane>
</pane>
<pane id="Scope" />
<pane id="Scratches" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="settings.editor.selected.configurable" value="editor.preferences.import" />
<property name="settings.editor.selected.configurable" value="fileTemplates" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/util" />
</key>
<key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/page" />
</key>
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/page/page_obj/customer" />
<recent name="$PROJECT_DIR$/util" />
</key>
</component>
<component name="RunDashboard">
<option name="ruleStates">
@ -237,26 +317,23 @@
</list>
</option>
</component>
<component name="RunManager" selected="Python.ccustomer">
<configuration name="ccustomer" type="PythonConfigurationType" factoryName="Python" temporary="true">
<component name="RunManager" selected="Python.mark">
<configuration name="Unittests for test_case.test_ccustomer.TestCcustomer.test_search_exist_customer" type="tests" factoryName="Unittests" temporary="true" nameIsGenerated="true">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<envs />
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/page/page_obj/customer" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<module name="ui_checker" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/page/page_obj/customer/ccustomer.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="_new_additionalArguments" value="&quot;&quot;" />
<option name="_new_target" value="&quot;test_case.test_ccustomer.TestCcustomer.test_search_exist_customer&quot;" />
<option name="_new_targetType" value="&quot;PYTHON&quot;" />
</configuration>
<configuration name="email" type="PythonConfigurationType" factoryName="Python" temporary="true">
<configuration name="born" type="PythonConfigurationType" factoryName="Python" temporary="true">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
@ -269,12 +346,12 @@
<option name="ADD_SOURCE_ROOTS" value="true" />
<module name="ui_checker" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/util/e_mail.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/util/born.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
</configuration>
<configuration name="log" type="PythonConfigurationType" factoryName="Python" temporary="true">
<configuration name="db" type="PythonConfigurationType" factoryName="Python" temporary="true">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
@ -287,12 +364,12 @@
<option name="ADD_SOURCE_ROOTS" value="true" />
<module name="ui_checker" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/util/log.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/util/db.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
</configuration>
<configuration name="logging" type="PythonConfigurationType" factoryName="Python" temporary="true">
<configuration name="mark" type="PythonConfigurationType" factoryName="Python" temporary="true">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
@ -305,43 +382,43 @@
<option name="ADD_SOURCE_ROOTS" value="true" />
<module name="ui_checker" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/util/logging.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/util/mark.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
</configuration>
<configuration name="page" type="PythonConfigurationType" factoryName="Python" temporary="true">
<configuration name="wdeliveryer" type="PythonConfigurationType" factoryName="Python" temporary="true">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/page" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/page/page_obj/logistics" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<module name="ui_checker" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/page/page.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/page/page_obj/logistics/wdeliveryer.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
</configuration>
<list size="5">
<item index="0" class="java.lang.String" itemvalue="Python.email" />
<item index="1" class="java.lang.String" itemvalue="Python.logging" />
<item index="2" class="java.lang.String" itemvalue="Python.log" />
<item index="3" class="java.lang.String" itemvalue="Python.page" />
<item index="4" class="java.lang.String" itemvalue="Python.ccustomer" />
<item index="0" class="java.lang.String" itemvalue="Python.db" />
<item index="1" class="java.lang.String" itemvalue="Python tests.Unittests for test_case.test_ccustomer.TestCcustomer.test_search_exist_customer" />
<item index="2" class="java.lang.String" itemvalue="Python.mark" />
<item index="3" class="java.lang.String" itemvalue="Python.wdeliveryer" />
<item index="4" class="java.lang.String" itemvalue="Python.born" />
</list>
<recent_temporary>
<list size="5">
<item index="0" class="java.lang.String" itemvalue="Python.ccustomer" />
<item index="1" class="java.lang.String" itemvalue="Python.page" />
<item index="2" class="java.lang.String" itemvalue="Python.log" />
<item index="3" class="java.lang.String" itemvalue="Python.logging" />
<item index="4" class="java.lang.String" itemvalue="Python.email" />
<item index="0" class="java.lang.String" itemvalue="Python.mark" />
<item index="1" class="java.lang.String" itemvalue="Python.born" />
<item index="2" class="java.lang.String" itemvalue="Python.wdeliveryer" />
<item index="3" class="java.lang.String" itemvalue="Python tests.Unittests for test_case.test_ccustomer.TestCcustomer.test_search_exist_customer" />
<item index="4" class="java.lang.String" itemvalue="Python.db" />
</list>
</recent_temporary>
</component>
@ -351,6 +428,7 @@
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="c4051f0c-bcae-438d-9a4b-fba6b18599e4" name="Default" comment="" />
<changelist id="85a794d2-3f52-4373-9706-ee8adb5562ca" name="New changelist" comment="" />
<created>1509119738165</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
@ -358,31 +436,66 @@
</task>
<servers />
</component>
<component name="TestHistory">
<history-entry file="Unittests_for_test_case_test_ccustomer_TestCcustomer_test_search_exist_customer - 2017.11.04 at 18h 23m 43s.xml">
<configuration name="Unittests for test_case.test_ccustomer.TestCcustomer.test_search_exist_customer" configurationId="tests" />
</history-entry>
<history-entry file="Unittests_for_test_case_test_ccustomer_TestCcustomer_test_search_exist_customer - 2017.11.04 at 19h 24m 12s.xml">
<configuration name="Unittests for test_case.test_ccustomer.TestCcustomer.test_search_exist_customer" configurationId="tests" />
</history-entry>
<history-entry file="Unittests_for_test_case_test_ccustomer_TestCcustomer_test_search_exist_customer - 2017.11.04 at 20h 05m 41s.xml">
<configuration name="Unittests for test_case.test_ccustomer.TestCcustomer.test_search_exist_customer" configurationId="tests" />
</history-entry>
<history-entry file="Unittests_for_test_case_test_ccustomer_TestCcustomer_test_search_exist_customer - 2017.11.04 at 20h 07m 20s.xml">
<configuration name="Unittests for test_case.test_ccustomer.TestCcustomer.test_search_exist_customer" configurationId="tests" />
</history-entry>
<history-entry file="Unittests_for_test_case_test_ccustomer_TestCcustomer_test_search_exist_customer - 2017.11.04 at 20h 08m 59s.xml">
<configuration name="Unittests for test_case.test_ccustomer.TestCcustomer.test_search_exist_customer" configurationId="tests" />
</history-entry>
<history-entry file="Unittests_for_test_case_test_ccustomer_TestCcustomer_test_search_exist_customer - 2017.11.04 at 20h 10m 32s.xml">
<configuration name="Unittests for test_case.test_ccustomer.TestCcustomer.test_search_exist_customer" configurationId="tests" />
</history-entry>
<history-entry file="Unittests_for_test_case_test_ccustomer_TestCcustomer_test_search_exist_customer - 2017.11.04 at 20h 11m 56s.xml">
<configuration name="Unittests for test_case.test_ccustomer.TestCcustomer.test_search_exist_customer" configurationId="tests" />
</history-entry>
<history-entry file="Unittests_for_test_case_test_ccustomer_TestCcustomer_test_search_exist_customer - 2017.11.04 at 20h 14m 55s.xml">
<configuration name="Unittests for test_case.test_ccustomer.TestCcustomer.test_search_exist_customer" configurationId="tests" />
</history-entry>
<history-entry file="Unittests_for_test_case_test_ccustomer_TestCcustomer_test_search_exist_customer - 2017.11.04 at 20h 49m 59s.xml">
<configuration name="Unittests for test_case.test_ccustomer.TestCcustomer.test_search_exist_customer" configurationId="tests" />
</history-entry>
<history-entry file="Unittests_for_test_case_test_ccustomer_TestCcustomer_test_search_exist_customer - 2017.11.04 at 20h 54m 35s.xml">
<configuration name="Unittests for test_case.test_ccustomer.TestCcustomer.test_search_exist_customer" configurationId="tests" />
</history-entry>
</component>
<component name="ToolWindowManager">
<frame x="0" y="30" width="1366" height="738" extended-state="6" />
<frame x="-8" y="-8" width="1382" height="744" extended-state="6" />
<editor active="true" />
<layout>
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24597365" sideWeight="0.5" order="1" side_tool="false" content_ui="combo" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.17789166" sideWeight="0.5" order="1" side_tool="false" content_ui="combo" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
<window_info id="调试" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="true" content_ui="tabs" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.6898734" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.40851736" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="运行" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32911393" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32911393" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="true" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Data View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
<window_info id="调试" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4636076" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Debug Logs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="12" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3312102" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Execute Anonymous" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="12" side_tool="false" content_ui="tabs" />
<window_info id="运行" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32037324" sideWeight="0.5" order="12" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="combo" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Salesforce" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="12" side_tool="false" content_ui="tabs" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
@ -391,48 +504,25 @@
<component name="UnknownFeatures">
<option featureType="com.intellij.fileTypeFactory" implementationName="*.conf" />
<option featureType="com.intellij.fileTypeFactory" implementationName="*.log" />
<option featureType="com.intellij.fileTypeFactory" implementationName="*.tpl" />
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="VcsManagerConfiguration">
<option name="MAKE_NEW_CHANGELIST_ACTIVE" value="true" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager />
<breakpoint-manager>
<option name="time" value="6" />
</breakpoint-manager>
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/util/e_mail.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<element signature="e#39#75#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/util/config.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="60">
<caret line="4" column="33" lean-forward="false" selection-start-line="4" selection-start-column="33" selection-end-line="4" selection-end-column="33" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/conf/default.conf">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="135">
<caret line="9" column="5" lean-forward="false" selection-start-line="9" selection-start-column="5" selection-end-line="9" selection-end-column="5" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/util/file.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1170">
<caret line="79" column="0" lean-forward="false" selection-start-line="79" selection-start-column="0" selection-end-line="79" selection-end-column="0" />
<folding>
<element signature="e#23#34#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
@ -440,9 +530,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<element signature="e#39#75#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
@ -450,7 +537,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="60">
<caret line="4" column="33" lean-forward="true" selection-start-line="4" selection-start-column="33" selection-end-line="4" selection-end-column="33" />
<folding />
</state>
</provider>
</entry>
@ -458,7 +544,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="135">
<caret line="9" column="5" lean-forward="false" selection-start-line="9" selection-start-column="5" selection-end-line="9" selection-end-column="5" />
<folding />
</state>
</provider>
</entry>
@ -466,131 +551,282 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1170">
<caret line="79" column="0" lean-forward="true" selection-start-line="79" selection-start-column="0" selection-end-line="79" selection-end-column="0" />
<folding>
<element signature="e#23#34#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/.PyCharm2017.2/system/python_stubs/-1247972723/__builtin__.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="131">
<caret line="2228" column="8" lean-forward="false" selection-start-line="2228" selection-start-column="8" selection-end-line="2228" selection-end-column="8" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/util/logging.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="30">
<caret line="2" column="0" lean-forward="false" selection-start-line="2" selection-start-column="0" selection-end-line="2" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/report/log/log.log">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/report/log/&lt;type 'datetime.date'&gt;.log">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="60">
<caret line="4" column="0" lean-forward="true" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/.PyCharm2017.2/system/python_stubs/-1247972723/__builtin__.py" />
<entry file="file://$PROJECT_DIR$/util/logging.py" />
<entry file="file://$PROJECT_DIR$/report/log/log.log" />
<entry file="file://$PROJECT_DIR$/report/log/&lt;type 'datetime.date'&gt;.log" />
<entry file="file://$PROJECT_DIR$/report/log/2017-10-28.log">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/util/config.py">
<entry file="file://$APPLICATION_HOME_DIR$/helpers/pydev/pydevd.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="177">
<caret line="14" column="14" lean-forward="false" selection-start-line="14" selection-start-column="14" selection-end-line="14" selection-end-column="14" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/conf/default.conf">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="105">
<caret line="7" column="7" lean-forward="false" selection-start-line="7" selection-start-column="7" selection-end-line="7" selection-end-column="7" />
<folding />
<state relative-caret-position="882">
<caret line="1598" column="0" lean-forward="false" selection-start-line="1598" selection-start-column="0" selection-end-line="1598" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/util/file.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="112">
<caret line="22" column="14" lean-forward="true" selection-start-line="22" selection-start-column="14" selection-end-line="22" selection-end-column="14" />
<folding>
<element signature="e#23#34#0" expanded="true" />
</folding>
<state relative-caret-position="1815">
<caret line="121" column="0" lean-forward="false" selection-start-line="121" selection-start-column="0" selection-end-line="121" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/conf/default.conf">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="195">
<caret line="22" column="12" lean-forward="true" selection-start-line="22" selection-start-column="7" selection-end-line="22" selection-end-column="12" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/util/config.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="15">
<caret line="1" column="14" lean-forward="false" selection-start-line="1" selection-start-column="14" selection-end-line="1" selection-end-column="14" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test_case/test_ccustomer.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="525">
<caret line="38" column="42" lean-forward="false" selection-start-line="38" selection-start-column="42" selection-end-line="38" selection-end-column="42" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/util/db.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="420">
<caret line="30" column="37" lean-forward="false" selection-start-line="30" selection-start-column="37" selection-end-line="30" selection-end-column="37" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/util/header.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="210">
<caret line="14" column="0" lean-forward="true" selection-start-line="14" selection-start-column="0" selection-end-line="14" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/util/e_mail.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="324">
<caret line="45" column="16" lean-forward="true" selection-start-line="45" selection-start-column="16" selection-end-line="45" selection-end-column="16" />
<folding />
<state relative-caret-position="585">
<caret line="43" column="0" lean-forward="false" selection-start-line="43" selection-start-column="0" selection-end-line="43" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/util/method.py" />
<entry file="file://$PROJECT_DIR$/util/root.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="45">
<caret line="3" column="0" lean-forward="false" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/util/report.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/util/monkey.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="255">
<caret line="17" column="0" lean-forward="false" selection-start-line="17" selection-start-column="0" selection-end-line="17" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/util/runtime.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="622">
<caret line="72" column="0" lean-forward="false" selection-start-line="72" selection-start-column="0" selection-end-line="72" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/requirements.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="30">
<caret line="2" column="7" lean-forward="false" selection-start-line="2" selection-start-column="7" selection-end-line="2" selection-end-column="7" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/util/spider.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="660">
<caret line="44" column="8" lean-forward="false" selection-start-line="44" selection-start-column="8" selection-end-line="44" selection-end-column="8" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/page/page_elm/customer/ccustomer.ini">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="315">
<caret line="21" column="33" lean-forward="false" selection-start-line="21" selection-start-column="33" selection-end-line="21" selection-end-column="33" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/page/page_elm/logistics/wdeliveryer.ini">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="8" column="30" lean-forward="false" selection-start-line="8" selection-start-column="30" selection-end-line="8" selection-end-column="30" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/page/page_obj/logistics/wdeliveryer.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="41" selection-end-column="12" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/page/page_obj/system1/page1.py" />
<entry file="file://$PROJECT_DIR$/util/page_obj.tpl">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="60">
<caret line="4" column="21" lean-forward="false" selection-start-line="4" selection-start-column="21" selection-end-line="4" selection-end-column="21" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/page/page_elm/system1/page1.ini" />
<entry file="file://$PROJECT_DIR$/page/page_elm/system1/page2.ini" />
<entry file="file://$PROJECT_DIR$/page/page_elm/system1/page3.ini" />
<entry file="file://$PROJECT_DIR$/page/page_obj/system1/__init__.py" />
<entry file="file://$PROJECT_DIR$/util/log.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/util/decorator.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
<caret line="13" column="26" lean-forward="true" selection-start-line="13" selection-start-column="26" selection-end-line="13" selection-end-column="26" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/util/locate.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="405">
<caret line="54" column="0" lean-forward="true" selection-start-line="54" selection-start-column="0" selection-end-line="54" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test_case/base.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="330">
<caret line="23" column="17" lean-forward="false" selection-start-line="23" selection-start-column="17" selection-end-line="23" selection-end-column="17" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/util/page_elm.tpl">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="75">
<caret line="5" column="0" lean-forward="false" selection-start-line="5" selection-start-column="0" selection-end-line="5" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/util/snapshot.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="60">
<caret line="18" column="6" lean-forward="false" selection-start-line="18" selection-start-column="6" selection-end-line="18" selection-end-column="6" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/util/born.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="840">
<caret line="57" column="16" lean-forward="false" selection-start-line="57" selection-start-column="16" selection-end-line="57" selection-end-column="16" />
<folding>
<element signature="e#15#29#0" expanded="false" />
<element signature="e#288#297#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/page/page_obj/customer/ccustomer.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="234">
<caret line="24" column="43" lean-forward="false" selection-start-line="24" selection-start-column="43" selection-end-line="24" selection-end-column="43" />
<folding>
<element signature="e#0#10#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/page/page_elm/customer/ccustomer.ini">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="6" column="24" lean-forward="false" selection-start-line="6" selection-start-column="24" selection-end-line="6" selection-end-column="24" />
<folding />
<caret line="6" column="27" lean-forward="false" selection-start-line="6" selection-start-column="27" selection-end-line="6" selection-end-column="27" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/page/page.py">
<entry file="file://$PROJECT_DIR$/util/cli.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="75">
<caret line="43" column="0" lean-forward="true" selection-start-line="43" selection-start-column="0" selection-end-line="43" selection-end-column="0" />
<folding>
<element signature="e#26#35#0" expanded="true" />
</folding>
<state relative-caret-position="210">
<caret line="14" column="0" lean-forward="false" selection-start-line="14" selection-start-column="0" selection-end-line="14" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/util/action.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="553">
<caret line="52" column="0" lean-forward="false" selection-start-line="52" selection-start-column="0" selection-end-line="52" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/page/page_obj/__init__.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/page/page_obj/login/login.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="135">
<caret line="9" column="0" lean-forward="true" selection-start-line="9" selection-start-column="0" selection-end-line="9" selection-end-column="0" />
<folding>
<element signature="e#0#31#0" expanded="true" />
</folding>
<state relative-caret-position="270">
<caret line="20" column="0" lean-forward="false" selection-start-line="20" selection-start-column="0" selection-end-line="20" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/page/page_obj/customer/ccustomer2.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="330">
<caret line="26" column="18" lean-forward="false" selection-start-line="26" selection-start-column="18" selection-end-line="26" selection-end-column="18" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/util/mark.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="88">
<caret line="31" column="48" lean-forward="false" selection-start-line="31" selection-start-column="48" selection-end-line="31" selection-end-column="48" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/util/browser.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="283">
<caret line="28" column="0" lean-forward="false" selection-start-line="28" selection-start-column="0" selection-end-line="28" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/page/page.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="450">
<caret line="39" column="40" lean-forward="false" selection-start-line="39" selection-start-column="40" selection-end-line="39" selection-end-column="40" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="FIRST">
<first_editor relative-caret-position="60">
<caret line="4" column="13" lean-forward="false" selection-start-line="4" selection-start-column="13" selection-end-line="4" selection-end-column="13" />
<folding />
</first_editor>
<second_editor />
</state>
</provider>
<provider editor-type-id="text-editor">
<state relative-caret-position="516">
<caret line="77" column="45" lean-forward="false" selection-start-line="77" selection-start-column="45" selection-end-line="77" selection-end-column="45" />
<folding />
</state>
</provider>
</entry>

View File

@ -69,3 +69,14 @@ from selenium import webdriver
driver = webdriver.Chrome()
driver.get("https://github.com/")
print driver.title
# 分层
1. 驱动层: 文件的读取解析db链接的建立ssh链接的建立smtp链接的建立浏览器驱动
2. 逻辑层: 配置文件的读取db ORM, client对象webdriver补充定位方法及操作方法邮件功能报告功能
3. 页面层: page 原型page object 和 page element页面基本操作登陆登出
5. 业务层: 基本业务,如下单,申购,开具发票等
6. 用例层: 基于页面层的单测用例和基于业务层的场景用例包括prepare和clean
7. 控制层: 用例执行控制,并发,多次,多种执行策略
8. web层 网站Dashboard
其他: 批量生产page object 和 page elment 自动获取 元素 定位方式

View File

@ -17,9 +17,10 @@ password=hanzhichao
[db]
host=192.168.100.198
db=spicespirt
port=3306
db=spicespirit
user=root
password=spice
passwd=spice
# test env host
[server]

0
driver/chromedriver Executable file → Normal file
View File

View File

@ -1,61 +1,143 @@
# -*- coding=utf-8 -*-
# !/usr/bin/env python
# -*- coding=utf-8 -*-
"""
-------------------------------------------------------
File Name: mark.py
Author: Han Zhichao
Date: 2017/11/05
Description:
-------------------------------------------------------
"""
__author__ = 'Han Zhichao'
# -*- coding=utf-8 -*-
import inspect
from time import sleep
import os
import sys
import unittest
from selenium import webdriver
from util.file import ConfFile
from selenium.webdriver.common.by import By
sys.path.append('../..')
from util.browser import Chrome
from util import config
from util.decorator import exec_time
from util.root import project_root
from util.db import DB
class Page(object):
def __init__(self, driver, page_elm): # eg: 'customer/ccustomer.ini'
page = ''
def __init__(self, driver, base_url=config.get('env', 'base_url')):
self.driver = driver
self.page_elm_file = '../../page_elm/' + page_elm
page = ConfFile.load_section(self.page_elm_file, 'page') # ? If in windows os is OK?
print page
self.menu = tuple(page['menu'].splite(','))
self.subject = page['subject']
self.base_url = base_url
self.username = config.get('env', 'username')
self.password = config.get('env', 'password')
print self.menu, self.subject
# 得到子类PageObject页面所对应的PageElm文件路径并解析
if __name__ != '__main__':
# page_obj_file = inspect.stack()[1][1] # 获取上级调用函数的文件名
# page_elm_file = page_obj_file.replace('page_obj', 'page_elm').replace('.py', '.ini')
page_elm_file = project_root() + "/page/page_elm/" + self.page + ".ini"
self.page_conf = ConfFile.load(page_elm_file)
# self.menu = tuple(page_conf['page']['menu'].split(',')) # todo try...except...
# self.subject = page_conf['page']['subject'] # todo try...except...
elements_conf = self.page_conf['element'] # todo try...except...
for element_name in elements_conf:
elements_conf[element_name] = tuple(elements_conf[element_name].split(','))
self.elements = elements_conf
def on_page(self, subject):
actual_subject = self._find_element(By.XPATH, '//*[@id="iframe"]/div/h1').text # todo
print("实际文本:%s" % actual_subject, "配置文件中的文本:%s" % subject)
# return subject == actual_subject
return subject in actual_subject
def elm(self, element):
return tuple(ConfFile.get(self.page_elm_file, 'element', element).split(','))
@exec_time
def login(self):
login_url = self.base_url + '/index/index/login'
self.driver.get(login_url)
sleep(1)
self._find_element(By.ID, 'nickname').clear()
self._find_element(By.ID, 'nickname').send_keys(self.username)
self._find_element(By.ID, 'password').clear()
self._find_element(By.ID, 'password').send_keys(self.password)
self._find_element(By.ID, 'login').click()
sleep(1)
# element method
def find_element(loc):
return self.driver.find_element(loc)
def locate(element):
element_loc = PageElm.get(element)
return self.driver.find_element(element_loc)
def type(element,str):
element = locate(element)
element.clear()
element.send_keys(str)
# page method
def on_page(self):
actual_subject = self.driver.find_element_by_xpath('//*[@id="iframe"]/div/h1')
return self.subject==actual_subject
def logout(self):
self._find_element(By.CLASS_NAME, 'btn-bg1').click()
def _load(self, page=page):
# login required
# self.driver.get(self.base_url+'/index/index/index')
page_elm_file = project_root() + "/page/page_elm/" + page + ".ini"
self.page_conf = ConfFile.load(page_elm_file)
menu = tuple(self.page_conf['page']['menu'].split(',')) # todo try...except...
subject = self.page_conf['page']['subject'] # todo try...except...
self._find_element(By.PARTIAL_LINK_TEXT, menu[0]).click()
self._find_element(By.LINK_TEXT, menu[1]).click()
self._find_element(By.LINK_TEXT, menu[2]).click()
sleep(1)
assert self.on_page(subject), "Load Page Error."
@exec_time
def load(self):
self.find_element(By.PARTIAL_LINK_TEXT,self.menu[0]).click()
self.find_element(By.LINK_TEXT, self.menu[1]).click()
self.find_element(By.LINK_TEXT, self.menu[2]).click()
assert self.on_page(), "Load Page Error."
self.login()
self._load(self.page)
@exec_time
def turn_to(self, page): # maybe bugs exists when turn_to other page
self.driver.refresh()
self._load(page)
@exec_time
def find_element(self, element_name):
element_loc = self.elements[element_name] # todo try... except ...
return self._find_element(*element_loc)
def _find_element(self, *loc):
return self.driver.find_element(*loc)
@exec_time
def get_value(self, element_name):
return self.find_element(element_name).get_attribute('value')
@exec_time
def get_text(self, element_name):
return self.find_element(element_name).text
@exec_time
def type(self, element, *value):
element.clear()
element.send_keys(*value)
@exec_time
def open(self, url):
self.driver.get(url)
@exec_time
def get_db_map(self, element_name):
return tuple(self.page_conf['db_map'][element_name].split(','))
@exec_time
def get_db_value(self, element_name, where_condition):
db = DB()
db_map = self.get_db_map(element_name)
return db.get(key=db_map[0], table=db_map[1], where_condition=where_condition)[0]
@exec_time
def compare_db(self, element_name, where_condition):
page_element_value = self.get_value(element_name)
element_db_map_value = self.get_db_value(element_name, where_condition)
return page_element_value == element_db_map_value
if __name__ == '__main__':
# d = Chrome.headless()
d = webdriver.Chrome('../driver/chromedriver')
d = Chrome.normal()
# d.get('https://www.baidu.com')
p = Page(d)
p.login()
print(d.title)
d.quit()
# p.login()
# p.load()
# print os.path.dirname(__file__).split(os.sep)[-1]
# print os.path.basename(__file__).split('.')[0] + '.ini'
# print os.path.abspath(__file__).replace('.py', '.ini')

Binary file not shown.

View File

@ -1,7 +1,31 @@
[page]
menu=综合管理系统,综合管理,综合信息
menu=客服管理系统,综合管理,综合信息
subject=会员信息
[element]
search_phone=id,search_phone
search_btn=id,search_btn
customer_search_phone=id,order_user_phone
customer_search_btn=id,order_search_user
customer_username=id,username
customer_phone=id,phone
customer_id_card=id,id_card
customer_birthday=id,birthday
customer_sex=xpath,.//label[text()="性别:"]/following::input[@type="radio"][@checked="checked"][1]/following::span[1]
customer_nation=id,nation
customer_consume_sum=xpath,.//label[@text()='消费金额:']/following::input[1]
customer_consume_time=xpath,.//label[@text()='消费次数:']/following::input[1]
customer_source=xpath,.//label[@text()='客户来源:']/following::select/option[@select="selected"]
customer_remark=id,remark
customer_save_btn=id,member_save
[db_map]
customer_username=username,u_user
customer_phone=phone,u_user
customer_id_card=id_card,u_user
customer_birthday=birthday,u_user
customer_sex=sex,u_user
customer_nation=nation,u_user
;customer_consume_sum=id_card,u_user
;customer_consume_time=id_card,u_user
customer_source=source,u_user
customer_remark=remark,u_user

View File

@ -0,0 +1,13 @@
[page]
menu=物流管理系统,站点基本信息,物流人员管理
subject=配送人信息
[element]
name=id,get-name
search_btn=id,JS-getName
modify_link=xpath,//a[text()='修改']
;==============sub_modify_page
select_station=id,JS-deliveryer_station
update_button=id,JS-mody
station=xpath,//option[text()='大钟寺']

View File

@ -1,30 +1,37 @@
import sys
# !/usr/bin/env python
# -*- coding=utf-8 -*-
"""
-------------------------------------------------------
File Name: mark.py
Author: Han Zhichao
Date: 2017/11/05
Description:
-------------------------------------------------------
"""
__author__ = 'Han Zhichao'
from time import sleep
import os
from selenium import webdriver
sys.path.append('..')
from page.page import Page
from util.browser import Chrome
class CCustomer(Page):
def search_phone(self):
pass
# elm(self.filename, 'search_phone').send_keys('18010181267')
# elm(self.filename, 'search_btn').click()
page = 'customer/ccustomer'
def search_phone(self, phone):
self.find_element('customer_search_phone').send_keys(phone)
self.find_element('customer_search_btn').click()
sleep(1)
if __name__ == '__main__':
# d = Chrome.headless()
# print os.path.dirname(__file__)
d = webdriver.Chrome('../../../driver/chromedriver')
p=CCustomer(d,'customer/ccustomer.ini')
# d = Chrome.normal()
d = Chrome.headless()
p = CCustomer(d)
p.load()
p.search_phone('18010181267')
sleep(10)
d.quit()
# p.login()
# sleep(1)
# p.load()
# p.search_phone()

View File

@ -0,0 +1,46 @@
# !/usr/bin/env python
# -*- coding=utf-8 -*-
"""
-------------------------------------------------------
File Name: mark.py
Author: Han Zhichao
Date: 2017/11/05
Description:
-------------------------------------------------------
"""
__author__ = 'Han Zhichao'
import sys
from time import sleep
import os
from selenium import webdriver
sys.path.append('..')
from page.page import Page
from util.browser import Chrome
class CCustomer(Page):
filename = os.path.basename(__file__)
def search_phone(self):
pass
# elm(self.filename, 'search_phone').send_keys('18010181267')
# elm(self.filename, 'search_btn').click()
if __name__ == '__main__':
# d = Chrome.headless()
# print os.path.dirname(__file__)
d = webdriver.Chrome('../../../driver/chromedriver')
p=CCustomer(d)
d.quit()
# p.login()
# sleep(1)
# p.load()
# p.search_phone()

View File

@ -1,3 +1,17 @@
# !/usr/bin/env python
# -*- coding=utf-8 -*-
"""
-------------------------------------------------------
File Name: mark.py
Author: Han Zhichao
Date: 2017/11/05
Description:
-------------------------------------------------------
"""
__author__ = 'Han Zhichao'
from util.browser import Chrome
from selenium import webdriver
import sys
@ -18,5 +32,3 @@ class Login(Page):
self.driver.find_element_by_id('password').send_keys(self.password)
self.driver.find_element_by_id('login').click()
def logout(self):
self.driver.find_element_by_class_name('btn-bg1').click()

View File

@ -0,0 +1,42 @@
# !/usr/bin/env python
# -*- coding=utf-8 -*-
"""
-------------------------------------------------------
File Name: wdeliveryer.py
Author: Han Zhichao
Date: 2017/11/5
Description:
-------------------------------------------------------
"""
__author__ = 'Han Zhichao'
from time import sleep
from page.page import Page
from util.browser import Chrome
class WDeliveryer(Page):
page = 'logistics/wdeliveryer'
def search_name(self, name):
self.find_element('name').send_keys(name)
self.find_element('search_btn').click()
sleep(1)
self.find_element('modify_link').click()
sleep(1)
self.find_element('select_station').click()
sleep(1)
self.find_element('station').click()
sleep(3)
self.find_element('update_btn').click()
if __name__ == '__main__':
d = Chrome.normal()
# d = Chrome.headless()
p = WDeliveryer(d)
p.load()
p.search_name('韩志超')
sleep(5)
d.quit()

View File

@ -1,3 +1,3 @@
selenium
xlrd
pymysql
pymysql

View File

@ -0,0 +1,42 @@
# !/usr/bin/env python
# -*- coding=utf-8 -*-
"""
-------------------------------------------------------
File Name: mark.py
Author: Han Zhichao
Date: 2017/11/05
Description:
-------------------------------------------------------
"""
__author__ = 'Han Zhichao'
import unittest
from util.browser import Chrome
class Base(unittest.TestCase):
type = 'normal' # normal, smoke, snacirors
level = 1 # 1-5
times = 1
concurrency = 1
timeout = 0
skip = False
def prepare(self):
pass
def clean(self):
pass
def setUp(self):
self.driver = Chrome.normal()
# self.driver = Chrome.headless()
self.driver.implicitly_wait(10)
self.driver.maximize_window()
# login()
def tearDown(self):
self.driver.quit()
# logout()

View File

@ -1,3 +1,17 @@
# !/usr/bin/env python
# -*- coding=utf-8 -*-
"""
-------------------------------------------------------
File Name: mark.py
Author: Han Zhichao
Date: 2017/11/05
Description:
-------------------------------------------------------
"""
__author__ = 'Han Zhichao'
-*- coding:utf-8 -*-
from selenium import webdriver
from selenium.webdriver.chrome.options import Options

View File

@ -0,0 +1,68 @@
# !/usr/bin/env python
# -*- coding=utf-8 -*-
"""
-------------------------------------------------------
File Name: mark.py
Author: Han Zhichao
Date: 2017/11/05
Description:
-------------------------------------------------------
"""
__author__ = 'Han Zhichao'
from time import sleep
from .base import Base
from page.page_obj.customer.ccustomer import CCustomer
class TestCcustomer(Base):
def test_search_exist_customer(self):
phone = '18010181267'
page = CCustomer(self.driver)
page.load()
page.search_phone(phone)
# page values
customer_phone = page.get_value('customer_phone')
customer_username = page.get_value('customer_username')
customer_id_card = page.get_value('customer_id_card')
customer_sex = page.get_text('customer_id_card')
customer_birthday = page.get_value('customer_birthday')
customer_nation = page.get_value('customer_id_card')
customer_source = page.get_text('customer_id_card')
customer_remark = page.get_text('customer_id_card')
# db values
where_condition = "phone='%s'" % phone
db_customer_username = page.get_db_value('customer_username', where_condition)
db_customer_phone = page.get_db_value('customer_phone', where_condition)
db_customer_id_card = page.get_db_value('customer_id_card', where_condition)
db_customer_sex = page.get_db_value('customer_sex', where_condition)
db_customer_birthday = page.get_db_value('customer_birthday', where_condition)
db_customer_nation = page.get_db_value('customer_nation', where_condition)
db_customer_source = page.get_db_value('customer_source', where_condition)
db_customer_remark = page.get_db_value('customer_remark', where_condition)
# compare search result and expect
self.assertEqual(customer_phone, phone)
# compare search result and db_map
self.assertEqual(customer_username, db_customer_username)
self.assertEqual(customer_phone, db_customer_phone)
self.assertEqual(customer_id_card, db_customer_id_card)
print(page.find_element('customer_sex'))
sleep(10)
print("--------------")
print(customer_sex, db_customer_sex)
self.assertEqual(customer_sex, db_customer_sex)
self.assertEqual(customer_birthday, db_customer_birthday)
self.assertEqual(customer_nation, db_customer_nation)
self.assertEqual(customer_source, db_customer_source)
self.assertEqual(customer_remark, db_customer_remark)

60
util/action.py Normal file
View File

@ -0,0 +1,60 @@
# !/usr/bin/env python
# -*- coding=utf-8 -*-
"""
-------------------------------------------------------
File Name: mark.py
Author: Han Zhichao
Date: 2017/11/05
Description:
-------------------------------------------------------
"""
__author__ = 'Han Zhichao'
from random import random
import time
from selenium import webdriver
from selenium.webdriver.remote.webelement import WebElement
from selenium.webdriver.remote.webdriver import WebDriver
from util.decorator import show_duration
from util.browser import Chrome
@show_duration
def hello():
time.sleep(random())
print("hello")
class Action(WebElement, WebDriver):
@show_duration
def type(self, *value):
self.clear()
self.send_keys(*value)
@show_duration
def open(self, url):
self.get(url)
d = Chrome.headless()
d.get('http://www.baidu.com')
print(d.title)
d.find_element_by_id('kw').type('hanzhichao')
d.find_element_by_id('su').click()
print(d.title)
d.quit()

62
util/born.py Normal file
View File

@ -0,0 +1,62 @@
# !/usr/bin/env python
# -*- coding=utf-8 -*-
"""
-------------------------------------------------------
File Name: born.py
Author: Han Zhichao
Date: 2017/11/5
Description:
-------------------------------------------------------
"""
__author__ = 'Han Zhichao'
import os
from util.root import project_root
def create_page(path_dict):
path = project_root() + '/page'
page_obj_path = path + '/page_obj/'
page_elm_path = path + '/page_elm/'
with open('page_obj.tpl') as f:
page_obj_tpl = f.read()
with open('page_elm.tpl') as f:
page_elm_tpl = f.read()
for page_dir in path_dict:
page_obj_dir = page_obj_path + page_dir
page_elm_dir = page_elm_path + page_dir
if not os.path.exists(page_obj_dir):
os.makedirs(page_obj_dir)
print("make dir %s done" % page_obj_dir)
with open(page_obj_dir + '/' + '__init__.py', 'w') as f:
f.write('')
print("make file %s done" % (page_obj_dir + '/' + '__init__.py'))
if not os.path.exists(page_elm_dir):
os.makedirs(page_elm_dir)
print("make dir %s done" % page_elm_dir)
for page in path_dict[page_dir]:
page_obj = page_obj_dir + '/' + page + '.py'
page_elm = page_elm_dir + '/' + page + '.ini'
if not os.path.exists(page_obj):
file_name = page
first = page[:1].upper()
class_name = first + page[1:].capitalize()
path = page_dir + '/' + page
with open(page_obj, 'w') as f:
f.write(page_obj_tpl % (file_name, class_name, path, class_name))
print("make dir %s done" % page_obj)
if not os.path.exists(page_elm):
with open(page_elm, 'w') as f:
f.write(page_elm_tpl)
print("make dir %s done" % page_elm)
if __name__ == '__main__':
test_dict = {'system1': ['page1', 'page2', 'page3'], 'system2': ['page4', 'page5']}
create_page(test_dict)

View File

@ -1,17 +1,37 @@
# !/usr/bin/env python
# -*- coding=utf-8 -*-
"""
-------------------------------------------------------
File Name: mark.py
Author: Han Zhichao
Date: 2017/11/05
Description:
-------------------------------------------------------
"""
__author__ = 'Han Zhichao'
# -*- coding:utf-8 -*-
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from file import ConfFile
from util.root import project_root
import platform
class Chrome():
class Chrome(object):
def __init__(self):
pass
if platform.system() == 'Windows':
chrome_driver = project_root() + '/driver/chromedriver.exe'
else:
chrome_driver = project_root() + '/driver/chromedriver'
@classmethod
def normal(cls):
options = Options()
options.add_argument('disable-infobars') # 去掉"chrome正受到自动化测试软件的控制"的提示条
return webdriver.Chrome(chrome_options=options)
options.add_argument('disable-infobars') # 去掉"chrome正受到自动化测试软件的控制"的提示条
return webdriver.Chrome(cls.chrome_driver, chrome_options=options)
@classmethod
def headless(cls):
@ -19,7 +39,4 @@ class Chrome():
options.add_argument('disable-infobars')
options.add_argument('--headless') # 无界面模式
options.add_argument('--disable-gpu')
# options.binary_location =r'C:\Users\hldh214\AppData\Local\Google\Chrome\Application\chrome.exe' # Windows 下 chrome安装位置
# options.binary_location = '/opt/google/chrome/chrome' # Linux 下chrome安装位置
return webdriver.Chrome(chrome_options=options)
return webdriver.Chrome(cls.chrome_driver, chrome_options=options)

Binary file not shown.

View File

@ -0,0 +1,14 @@
# !/usr/bin/env python
# -*- coding=utf-8 -*-
"""
-------------------------------------------------------
File Name: mark.py
Author: Han Zhichao
Date: 2017/11/05
Description:
-------------------------------------------------------
"""
__author__ = 'Han Zhichao'

View File

@ -1,4 +1,34 @@
from file import ConfFile
# !/usr/bin/env python
# -*- coding=utf-8 -*-
"""
-------------------------------------------------------
File Name: mark.py
Author: Han Zhichao
Date: 2017/11/05
Description:
-------------------------------------------------------
"""
__author__ = 'Han Zhichao'
from util.file import ConfFile
from util.root import project_root
def get_all():
path = project_root() + '/conf/default.conf'
return ConfFile.load(path)
def get_section(section):
path = project_root() + '/conf/default.conf'
return ConfFile.load_section(path, section)
def get(section, option):
path = project_root() + '/conf/default.conf'
return ConfFile.get(path, section, option)
class Config(object):
@ -13,16 +43,16 @@ class Config(object):
try:
return self._dict[section]
except KeyError:
raise KeyError, "No section '%s' in '%s'" % (section, self.path)
raise KeyError
def get(self, section, option):
section_dict = self.section(section)
try:
return section_dict[option]
except KeyError, e:
raise KeyError, "No option '%s' in section '%s' of '%s'" % (option, section, self.path)
except KeyError:
raise KeyError
if __name__ == '__main__':
conf = Config()
print conf.get('email', 'wsmtp_server')
print(conf.get('email', 'smtp_server'))

Binary file not shown.

View File

@ -0,0 +1,54 @@
# !/usr/bin/env python
# -*- coding=utf-8 -*-
"""
-------------------------------------------------------
File Name: mark.py
Author: Han Zhichao
Date: 2017/11/05
Description:
-------------------------------------------------------
"""
__author__ = 'Han Zhichao'
import pymysql
from util.config import get_section
from util.decorator import exec_time
class DB(object):
def __init__(self, *args, **kwargs):
db_conf = get_section('db')
self.conn = pymysql.connect(host=db_conf['host'],
port=int(db_conf['port']),
user=db_conf['user'],
passwd=db_conf['passwd'],
db=db_conf['db'],
charset='utf8')
self.cursor = self.conn.cursor()
# def __del__(self):
# self.cursor.close()
# self.conn.close()
@exec_time
def exec_sql(self, sql):
print(sql)
effect_row = self.cursor.execute(sql)
return self.cursor.fetchall()
@exec_time
def get(self, key, table, where_condition):
sql = "SELECT %s FROM %s WHERE %s" % (key, table, where_condition)
effect_row = self.cursor.execute(sql)
return self.cursor.fetchone()
if __name__ == '__main__':
db = DB()
result = db.exec_sql("SELECT username FROM u_user WHERE phone='18010181267'")
print(result)
result = db.get('username', 'u_user', "phone='18010181267'")
print(result)

88
util/decorator.py Normal file
View File

@ -0,0 +1,88 @@
# !/usr/bin/env python
# -*- coding=utf-8 -*-
"""
-------------------------------------------------------
File Name: mark.py
Author: Han Zhichao
Date: 2017/11/05
Description:
-------------------------------------------------------
"""
__author__ = 'Han Zhichao'
import time
import inspect
from util.log import logger
def show_duration(action):
start = time.clock()
def wrapper(*args, **kwargs):
return action(*args, **kwargs)
end = time.clock()
duration = end - start
parent_action = inspect.stack()[1][4][0].strip()
# inspect.getargspec(action)
# varnames = action.__code__.co_varnames
print('{0}---{1}---{2}s'.format(parent_action, action.__name__, duration))
return wrapper
def exec_time(func):
def wrapper(*args, **kwargs):
t0 = time.time()
parent_action = inspect.stack()[1][4][0].strip()
# print("@%s, {%s} start" % (time.strftime("%X", time.localtime()), func.__name__))
back = func(*args, **kwargs)
# print("@%s, {%s} end" % (time.strftime("%X", time.localtime()), func.__name__))
# print("@%.3fs taken for {%s}" % (time.time() - t0, func.__name__))
logger.debug('{0}---{1}---{2}s'.format(parent_action, func.__name__, time.time()-t0))
return back
return wrapper
def level(test_case):
"""
0: smoke case
1:
:param test_case:
:return:
"""
pass
def case_type(test_case):
pass # how tempest run --type=somke ?
def limit_time(func):
pass
if __name__ == '__main__':
pass

BIN
util/decorator.pyc Normal file

Binary file not shown.

View File

@ -1,3 +1,17 @@
# !/usr/bin/env python
# -*- coding=utf-8 -*-
"""
-------------------------------------------------------
File Name: mark.py
Author: Han Zhichao
Date: 2017/11/05
Description:
-------------------------------------------------------
"""
__author__ = 'Han Zhichao'
#!/bin/python
# -*- coding=utf-8 -*-
from email.mime.text import MIMEText

View File

@ -1,11 +1,24 @@
# !/usr/bin/env python
# -*- coding=utf-8 -*-
"""
-------------------------------------------------------
File Name: mark.py
Author: Han Zhichao
Date: 2017/11/05
Description:
-------------------------------------------------------
"""
__author__ = 'Han Zhichao'
# -*- coding=utf-8 -*-
import json
import ConfigParser
try:
import xlrd
except Exception, e:
xlrd_not_installed = True
print e
from configparser import ConfigParser, NoSectionError, NoOptionError
# try:
# import xlrd
# except Exception:
# xlrd_not_installed = True
import codecs
@ -31,13 +44,13 @@ class ConfFile:
@classmethod
def _open(cls, path):
conf = ConfigParser.ConfigParser()
conf = ConfigParser()
try:
with codecs.open(path, encoding='utf-8-sig') as f:
conf.readfp(f)
conf.read_file(f)
return conf
except IOError, e:
raise IOError, e
except IOError:
raise IOError
# todo logging.error()
@classmethod
@ -45,13 +58,13 @@ class ConfFile:
conf = cls._open(path)
try:
return conf.get(section, option)
except ConfigParser.NoOptionError, e:
raise ConfigParser.NoOptionError, e
except NoOptionError:
raise NoOptionError
# todo logging.error()
# print '文件:%s[%s]中找不到%s项' % (path, section, option)
except ConfigParser.NoSectionError, e:
raise ConfigParser.NoSectionError, e
except NoSectionError:
raise NoSectionError
# todo logging.error()
# print '文件:%s[%s]中找不到%s项' % (path, section, option)
@ -78,35 +91,35 @@ class ConfFile:
return _dict
class ExcelFile:
def __init__(self):
pass
@classmethod
def get(cls, path, sheet, row, col):
wb = xlrd.open_workbook(path)
if isinstance(sheet, int):
sh = wb.sheet_by_index(sheet)
else:
sh = wb.sheet_by_name(sheet)
return sh.cell_value(row, col)
@classmethod
def load(cls, path, sheet=0):
wb = xlrd.open_workbook(path)
if isinstance(sheet, int):
sh = wb.sheet_by_index(sheet)
else:
sh = wb.sheet_by_name(sheet)
cols = sh.ncols
rows = sh.nrows
data_list = []
for row in range(1, rows):
data = {}
for col in range(0, cols):
data[sh.cell_value(0, col)] = sh.cell_value(row, col)
data_list.append(data)
return data_list
# class ExcelFile:
# def __init__(self):
# pass
#
# @classmethod
# def get(cls, path, sheet, row, col):
# wb = xlrd.open_workbook(path)
# if isinstance(sheet, int):
# sh = wb.sheet_by_index(sheet)
# else:
# sh = wb.sheet_by_name(sheet)
# return sh.cell_value(row, col)
#
# @classmethod
# def load(cls, path, sheet=0):
# wb = xlrd.open_workbook(path)
# if isinstance(sheet, int):
# sh = wb.sheet_by_index(sheet)
# else:
# sh = wb.sheet_by_name(sheet)
# cols = sh.ncols
# rows = sh.nrows
# data_list = []
# for row in range(1, rows):
# data = {}
# for col in range(0, cols):
# data[sh.cell_value(0, col)] = sh.cell_value(row, col)
# data_list.append(data)
# return data_list
class XMLFile:
@ -119,5 +132,4 @@ class XMLFile:
if __name__ == '__main__':
a=A
a.test()
pass

14
util/header.txt Normal file
View File

@ -0,0 +1,14 @@
# !/usr/bin/env python
# -*- coding=utf-8 -*-
"""
-------------------------------------------------------
File Name: %s
Author: Han Zhichao
Date: %s
Description:
-------------------------------------------------------
"""
__author__ = 'Han Zhichao'

77
util/locate.py Normal file
View File

@ -0,0 +1,77 @@
# !/usr/bin/env python
# -*- coding=utf-8 -*-
"""
-------------------------------------------------------
File Name: mark.py
Author: Han Zhichao
Date: 2017/11/05
Description:
-------------------------------------------------------
"""
__author__ = 'Han Zhichao'
def by_xpath(dr, xpath):
return dr.find_element_by_xpath(xpath)
def find_input_by_label(dr, label):
return dr.by_xpath('//label[text()=%s]/fllowing::input[1]' % label)
def find_input_by_hint_text(dr, hint_text):
return dr.by_xpath('//input[@placeholder=%d]' % hint_text)
def find_input_by_value(dr, value):
return dr.by_xpath('//input[@value=%d]' % value)
def find_element_by_text(dr, text):
return dr.by_xpath('//*[text()=%d]' % text)
def find_radio_by_label(dr, label):
return dr.by_xpath('//label[text()=%s]/following::input[@type="radio"][1]' % label)
def find_checked_radio_by_label(dr, label, checked="checked"):
return dr.by_xpath('//label[text()=%s]/following::input[@type="radio"][@checked="checked"][1]' % label)
def find_select_by_label(dr, label):
return dr.by_xpath('//label[text()=%s]/fllowing::select[1]' % label)
def find_selected_option_by_label(dr, label, selected="selected"):
return dr.by_xpath('//label[text()=%s]/fllowing::select[1]/following::option[@selected="selected"]' % label)
def find_text_by_table_column_name(dr, columen_name, n): # n means row_index=n,begin with 1
pass
def link(dr, link_text):
return dr.find_element_by_link_text(link_text)
def button(dr, value):
return dr.by_xpath('//input[@type="button"][@value=%d]' % value)
def input(dr, label):
return find_input_by_label(dr, label)
def select(dr, lavel):
pass
def radio(label):
pass
def tabel(top_left_text):
pass

View File

@ -1,3 +1,17 @@
# !/usr/bin/env python
# -*- coding=utf-8 -*-
"""
-------------------------------------------------------
File Name: mark.py
Author: Han Zhichao
Date: 2017/11/05
Description:
-------------------------------------------------------
"""
__author__ = 'Han Zhichao'
# coding=utf-8
import logging
import time

58
util/mark.py Normal file
View File

@ -0,0 +1,58 @@
# !/usr/bin/env python
# -*- coding=utf-8 -*-
"""
-------------------------------------------------------
File Name: mark.py
Author: Han Zhichao
Date: 2017/11/5
Description:
-------------------------------------------------------
"""
import time
import os
from util.root import project_root
__author__ = 'Han Zhichao'
def mark(py_file):
"""
add doc header to the python file
:param py_file: python file name with path
:return: null
"""
with open('header.txt') as f:
header = f.read() % (os.path.basename(__file__), time.strftime("%Y/%m/%d"))
with open(py_file, 'r', encoding='UTF-8') as f:
origin = f.read()
if '# !/usr/bin/env python' not in origin:
with open(py_file, 'w', encoding='UTF-8') as f:
f.write(header)
f.write(origin)
def mark_all(path):
for root, dirs, files in os.walk(path, topdown=False):
for name in files:
if name[-3:] == '.py' and name != '__init__.py':
print(os.path.join(root, name))
mark(os.path.join(root, name))
# for name in dirs:
# print(os.path.join(root, name))
def crlf2lf():
pass
def lf2crlf():
pass
if __name__ == '__main__':
mark('cli.py')
mark_all(project_root())

17
util/monkey.py Normal file
View File

@ -0,0 +1,17 @@
# !/usr/bin/env python
# -*- coding=utf-8 -*-
"""
-------------------------------------------------------
File Name: monkey.py
Author: Han Zhichao
Date: 2017/11/5
Description: random test for the page
-------------------------------------------------------
"""
__author__ = 'Han Zhichao'
def test_input_rules():
pass

8
util/page_elm.tpl Normal file
View File

@ -0,0 +1,8 @@
[page]
menu=
subject=
[element]
[db_map]

34
util/page_obj.tpl Normal file
View File

@ -0,0 +1,34 @@
# !/usr/bin/env python
# -*- coding=utf-8 -*-
"""
-------------------------------------------------------
File Name: %s.py
Author: Han Zhichao
Date: 2017/11/5
Description:
-------------------------------------------------------
"""
__author__ = 'Han Zhichao'
from time import sleep
from page.page import Page
from util.browser import Chrome
class %s(Page):
page = '%s'
def do_something(self):
pass
if __name__ == '__main__':
d = Chrome.normal()
# d = Chrome.headless()
p = %s(d)
p.load()
p.do_somthing()
sleep(5)
d.quit()

View File

@ -0,0 +1,14 @@
# !/usr/bin/env python
# -*- coding=utf-8 -*-
"""
-------------------------------------------------------
File Name: mark.py
Author: Han Zhichao
Date: 2017/11/05
Description:
-------------------------------------------------------
"""
__author__ = 'Han Zhichao'

20
util/root.py Normal file
View File

@ -0,0 +1,20 @@
# !/usr/bin/env python
# -*- coding=utf-8 -*-
"""
-------------------------------------------------------
File Name: mark.py
Author: Han Zhichao
Date: 2017/11/05
Description:
-------------------------------------------------------
"""
__author__ = 'Han Zhichao'
import os
def project_root():
return os.path.dirname(os.path.dirname(__file__))

72
util/runtime.py Normal file
View File

@ -0,0 +1,72 @@
# !/usr/bin/env python
# -*- coding=utf-8 -*-
"""
-------------------------------------------------------
File Name: runtime.py
Author: Han Zhichao
Date: 2017/11/5
Description:
-------------------------------------------------------
"""
__author__ = 'Han Zhichao'
def re_run():
pass
def run_smoke():
pass
def run_type(case_type):
pass
def run_level(level):
pass
def run_all():
pass
def run_model(model):
pass
def pause():
pass
def stop():
pass
def restart():
pass
def muti_run(concurrency, times):
pass
def step_run(test_case_list):
pass
def report_now(stop_run=False):
pass
def send_email():
pass
def take_snapshot():
pass
def act_by_email(subject):
pass

24
util/snapshot.py Normal file
View File

@ -0,0 +1,24 @@
# !/usr/bin/env python
# -*- coding=utf-8 -*-
"""
-------------------------------------------------------
File Name: mark.py
Author: Han Zhichao
Date: 2017/11/05
Description:
-------------------------------------------------------
"""
__author__ = 'Han Zhichao'
# -*- coding=utf-8 -*-
from util.root import project_root
# 截图函数
def take_snapshot(driver, file_name):
file_path = project_root() + '/report/snapshot/' + file_name
driver.get_screenshot_as_file(file_path)

45
util/spider.py Normal file
View File

@ -0,0 +1,45 @@
# !/usr/bin/env python
# -*- coding=utf-8 -*-
"""
-------------------------------------------------------
File Name: spider.py
Author: Han Zhichao
Date: 2017/11/5
Description: auto create page_obj files and page_elm files for all pages in spicespirt;
auto retrieve elements of the pages
-------------------------------------------------------
"""
__author__ = 'Han Zhichao'
def create_page_obj():
pass
def create_page_elm():
pass
def get_elements():
pass
def hanzi2pinyin():
pass
def hanzi2english():
pass
def hanzi2var():
pass
def get_var_map():
pass
def mkdir(path_dict):
pass

View File

@ -0,0 +1,14 @@
# !/usr/bin/env python
# -*- coding=utf-8 -*-
"""
-------------------------------------------------------
File Name: mark.py
Author: Han Zhichao
Date: 2017/11/05
Description:
-------------------------------------------------------
"""
__author__ = 'Han Zhichao'

BIN
util/util.pyc Normal file

Binary file not shown.