Browse Source

upate utility add findGroupByName

hegl 8 years ago
parent
commit
bdafa0ae1f
2 changed files with 47 additions and 28 deletions
  1. 32 27
      .idea/workspace.xml
  2. 15 1
      common/utility.py

+ 32 - 27
.idea/workspace.xml

@@ -3,7 +3,6 @@
   <component name="ChangeListManager">
     <list default="true" id="82c8521e-4e92-439a-a797-bd5cecfdccd4" name="Default" comment="">
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/MyTest/moaTest.py" afterPath="$PROJECT_DIR$/MyTest/moaTest.py" />
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/common/utility.py" afterPath="$PROJECT_DIR$/common/utility.py" />
     </list>
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@@ -51,19 +50,18 @@
             <file leaf-file-name="utility.py" pinned="false" current-in-tab="true">
               <entry file="file://$PROJECT_DIR$/common/utility.py">
                 <provider selected="true" editor-type-id="text-editor">
-                  <state relative-caret-position="500">
-                    <caret line="143" column="14" lean-forward="true" selection-start-line="143" selection-start-column="14" selection-end-line="143" selection-end-column="14" />
+                  <state relative-caret-position="540">
+                    <caret line="121" column="82" lean-forward="true" selection-start-line="121" selection-start-column="82" selection-end-line="121" selection-end-column="82" />
                     <folding>
                       <element signature="e#95#250#0" expanded="false" />
                       <element signature="e#286#387#0" expanded="false" />
                       <element signature="e#429#670#0" expanded="false" />
-                      <element signature="e#725#1391#0" expanded="false" />
-                      <element signature="e#1422#2002#0" expanded="false" />
-                      <element signature="e#2039#2626#0" expanded="false" />
-                      <element signature="e#2673#4042#0" expanded="false" />
-                      <element signature="e#4098#5342#0" expanded="false" />
-                      <element signature="e#5400#6978#0" expanded="false" />
-                      <element signature="e#7011#7124#0" expanded="false" />
+                      <element signature="e#724#1390#0" expanded="false" />
+                      <element signature="e#1421#2001#0" expanded="false" />
+                      <element signature="e#2051#2638#0" expanded="false" />
+                      <element signature="e#6118#7696#0" expanded="false" />
+                      <element signature="e#7729#7842#0" expanded="false" />
+                      <marker date="1495878447199" expanded="false" signature="2680:4052" ph="..." />
                     </folding>
                   </state>
                 </provider>
@@ -83,8 +81,8 @@
       <file leaf-file-name="moaTest.py" pinned="false" current-in-tab="true">
         <entry file="file://$PROJECT_DIR$/MyTest/moaTest.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="960">
-              <caret line="66" column="29" lean-forward="true" selection-start-line="66" selection-start-column="29" selection-end-line="66" selection-end-column="29" />
+            <state relative-caret-position="1060">
+              <caret line="63" column="0" lean-forward="true" selection-start-line="63" selection-start-column="0" selection-end-line="63" selection-end-column="0" />
               <folding>
                 <element signature="e#24#45#0" expanded="true" />
                 <marker date="1495877202421" expanded="false" signature="1344:1830" ph="..." />
@@ -764,7 +762,14 @@
       <option name="project" value="LOCAL" />
       <updated>1495869672411</updated>
     </task>
-    <option name="localTasksCounter" value="20" />
+    <task id="LOCAL-00020" summary="upate utility add personalInfomation&#10;">
+      <created>1495877534021</created>
+      <option name="number" value="00020" />
+      <option name="presentableId" value="LOCAL-00020" />
+      <option name="project" value="LOCAL" />
+      <updated>1495877534021</updated>
+    </task>
+    <option name="localTasksCounter" value="21" />
     <servers />
   </component>
   <component name="TestHistory">
@@ -810,7 +815,7 @@
   </component>
   <component name="ToolWindowManager">
     <frame x="1912" y="-368" width="2576" height="1456" extended-state="6" />
-    <editor active="false" />
+    <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.14765625" sideWeight="0.5" order="0" 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="6" side_tool="false" content_ui="tabs" />
@@ -818,7 +823,7 @@
       <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="3" 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="10" 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="8" side_tool="false" content_ui="tabs" />
-      <window_info id="Run" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.22808321" sideWeight="0.7807292" 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="true" show_stripe_button="true" weight="0.22808321" sideWeight="0.7807292" order="2" 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="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.33" sideWeight="0.5" order="9" 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="2" side_tool="true" content_ui="tabs" />
@@ -853,7 +858,8 @@
     <MESSAGE value="modify utility、moaTest" />
     <MESSAGE value="update untility add regularOperation、restApp" />
     <MESSAGE value="update moaTest&#10;" />
-    <option name="LAST_COMMIT_MESSAGE" value="update moaTest&#10;" />
+    <MESSAGE value="upate utility add personalInfomation&#10;" />
+    <option name="LAST_COMMIT_MESSAGE" value="upate utility add personalInfomation&#10;" />
   </component>
   <component name="XDebuggerManager">
     <breakpoint-manager>
@@ -1056,8 +1062,8 @@
     </entry>
     <entry file="file://$PROJECT_DIR$/MyTest/moaTest.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="960">
-          <caret line="66" column="29" lean-forward="true" selection-start-line="66" selection-start-column="29" selection-end-line="66" selection-end-column="29" />
+        <state relative-caret-position="1060">
+          <caret line="63" column="0" lean-forward="true" selection-start-line="63" selection-start-column="0" selection-end-line="63" selection-end-column="0" />
           <folding>
             <element signature="e#24#45#0" expanded="true" />
             <marker date="1495877202421" expanded="false" signature="1344:1830" ph="..." />
@@ -1067,19 +1073,18 @@
     </entry>
     <entry file="file://$PROJECT_DIR$/common/utility.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="500">
-          <caret line="143" column="14" lean-forward="true" selection-start-line="143" selection-start-column="14" selection-end-line="143" selection-end-column="14" />
+        <state relative-caret-position="540">
+          <caret line="121" column="82" lean-forward="true" selection-start-line="121" selection-start-column="82" selection-end-line="121" selection-end-column="82" />
           <folding>
             <element signature="e#95#250#0" expanded="false" />
             <element signature="e#286#387#0" expanded="false" />
             <element signature="e#429#670#0" expanded="false" />
-            <element signature="e#725#1391#0" expanded="false" />
-            <element signature="e#1422#2002#0" expanded="false" />
-            <element signature="e#2039#2626#0" expanded="false" />
-            <element signature="e#2673#4042#0" expanded="false" />
-            <element signature="e#4098#5342#0" expanded="false" />
-            <element signature="e#5400#6978#0" expanded="false" />
-            <element signature="e#7011#7124#0" expanded="false" />
+            <element signature="e#724#1390#0" expanded="false" />
+            <element signature="e#1421#2001#0" expanded="false" />
+            <element signature="e#2051#2638#0" expanded="false" />
+            <element signature="e#6118#7696#0" expanded="false" />
+            <element signature="e#7729#7842#0" expanded="false" />
+            <marker date="1495878447199" expanded="false" signature="2680:4052" ph="..." />
           </folding>
         </state>
       </provider>

+ 15 - 1
common/utility.py

@@ -24,7 +24,6 @@ def listIsDifent(newList, oldList):
     print '不同路径的长度',len(difListName)
     return difListName
 
-
 #登录APP
 def loginApp(self, loginName, password):
     print ('测试APP登录功能')
@@ -62,6 +61,7 @@ def loginOut(self):
             btn_sure.click()
     print('登出APP成功')
 
+#修改个人资料,更换头像
 def personalInformation(self):
     sleep(1)
     current_Act = self.driver.current_activity
@@ -114,6 +114,20 @@ def findOne(self, lookfor, topTree):
         print '出结果了要'
         return findflag
 
+def findGroupByName(self, groupName):
+    print ('测试群组查询功能')
+    current_Act = self.driver.current_activity
+    if current_Act == '.ui.activity.MainActivity':
+        self.driver.find_element_by_xpath(
+            '//android.widget.LinearLayout/android.widget.FrameLayout[2]').click()
+        # self.driver.tap([(333, 1224)])  # 此处定位在联系人界面
+        self.driver.find_element_by_name('群组').click()
+        self.driver.find_element_by_id('cn.wswin.moa:id/title').click()
+        self.driver.find_element_by_id('cn.wswin.moa:id/et_search_condition').click().send_keys(groupName)
+        # self.driver.keyevent(66)  # 66,确认键键码
+        self.driver.find_element_by_id('cn.wswin.moa:id/iv_search_button').click()
+
+
 #测试查询功能
 def findByName(self,loginName,displayName):
     print ('测试查询功能')