2016-05-03 9 views
13

मैं स्पर्श और स्वाइप का उपयोग करके एडीबी के साथ एक ऑटो वीडियो कॉल अनुकरण करने की कोशिश कर रहा हूं। परिदृश्य:एडीबी टचस्क्रीन स्वाइप कॉल में विफल रहता है

डिवाइस 1 ऑडियो डिवाइस 2, डिवाइस 2 उत्तर, डिवाइस 1 वीडियो कॉल (बिडरेक्शनल) के लिए पूछता है, डिवाइस 2 जवाब देने और विफल होने का प्रयास करता है। वायर्ड चीज यह है कि कभी-कभी यह काम करता है लेकिन अधिकांश उस बिंदु पर विफल रहता है जब डिवाइस 2 एडीबी स्वाइप के माध्यम से जवाब देने का प्रयास करता है।

@Test(timeout = 60000000) 
    /** 
    * 
    */ 
    @TestProperties(name = "Video call/Normal video call") 
    public void VT111_0011() throws InterruptedException, IOException, AWTException { 
     initTestVariable("Normal_Video_Call_Test_VT111_0011"); 
     sleep(idleBeforeTest); 
     System.out.println("Starting normal video test"); 
     Android.adbCommand(secondDevice.getDevice1(), "adb -s " + secondDevice.getDeviceID() + " shell input touchscreen swipe 355 858 590 858"); 

     for(int i=0; i<Iteration; i++) { 
      moveMouse(); 
      Jsystem.broadCastMessage("\nIteration " + i, globalVar.nameForLogFile); 
      cleanLogs(); 
      firstDevice.call(secondDevice); 
      Thread.sleep(2000); 
      if(secondDevice.isRinging()) 
       secondDevice.answerCall(1000); 
      else{ 
       ringingFail(); 
      } 

      // Start video by gui 
      Android.adbCommand(firstDevice.getDevice1(),"adb -s " + firstDevice.getDeviceID() + " shell input tap 650 380"); 
      Android.adbCommand(firstDevice.getDevice1(),"adb -s " + firstDevice.getDeviceID() + " shell input tap 420 470"); 
      Thread.sleep(1000); 
      Android.adbCommand(firstDevice.getDevice1(),"adb -s " + firstDevice.getDeviceID() + " shell input tap 197 780"); // 197 920 Video bidirectional 
      Thread.sleep(5500); 
      // Device2 answers video 
      Android.adbCommand(firstDevice.getDevice1(),"adb -s " + firstDevice.getDeviceID() + " shell input tap 355 858"); // 197 920 Video bidirectional 
      Android.adbCommand(secondDevice.getDevice1(), "adb -s " + secondDevice.getDeviceID() + " shell input touchscreen swipe 355 858 590 858"); 
      Thread.sleep(200); 
      Android.adbCommand(firstDevice.getDevice1(),"adb -s " + firstDevice.getDeviceID() + " shell input tap 60 372"); 
      Android.adbCommand(secondDevice.getDevice1(),"adb -s " + secondDevice.getDeviceID() + " shell input tap 60 372"); 


     /* Thread.sleep(5000); 
      if((!firstDevice.isInCall()) || (!secondDevice.isInCall())){ 
       inCallFail(); 
       continue; 
      } */ 
      int failsCounter = 0; 
      VerifyVideo verifyVideo = new VerifyVideo(); 
      for(int j = 8; j<10; j++){ 
       if(verifyVideo.verrfiyVideo(firstDevice, secondDevice) == false) 
        failsCounter++; 
      } 
      if(failsCounter>2) { 
       Jsystem.broadCastMessage("****** TEST FAILED, VIDEO DOSENT WORK GOOD ENOUGH ****** " , globalVar.nameForLogFile); 
       System.out.println("Number of fails: " + failsCounter); 
       comparePhototsFail(); 
      } 

      firstDevice.endCall(); 
      secondDevice.endCall(); 
      sleep(TimeBetweenIteration); 

     } 

    } 

कोई भी विचार:

यहाँ कोड है? धन्यवाद।

+0

"जवाब देने और विफल होने का प्रयास" से आपका क्या मतलब है? आप डिवाइस पर खुद क्या देखते हैं? यदि आप मैन्युअल रूप से एक वीडियो कॉल का जवाब देने का प्रयास करते हैं, तो क्या आप हमेशा सफल होते हैं? – TDG

+0

जब मैं इस कोड को चलाता हूं, तो secoundDevice उत्तर देने का प्रयास करता है एक पॉपअप मालिश है "दुर्भाग्य से फ़ोन बंद हो गया है" और कोई वीडियो नहीं है ... जब मैं वही परिदृश्य मैन्युअल रूप से करता हूं तो यह हर बार काम करता है। –

उत्तर

0
secondDevice tries to answer there is a popup message "unfortunately phone has stopped 

यह आपके डिवाइस/ऐप और स्क्रिप्ट नहीं है। लॉग लेने का प्रयास करें और इसे यहां पोस्ट करें।

इस स्क्रिप्ट के लिए, आपको पहले डिवाइस का संकल्प प्राप्त करना चाहिए और जांचें कि आप रिज़ॉल्यूशन ऊंचाई या चौड़ाई के बाहर स्वाइप नहीं कर रहे हैं।

shell input touchscreen swipe 355 858 590 858 

इसके अलावा, डेवलपर विकल्प के पास जाकर ताकि आप 'देख' सकते हैं, जहां वास्तव में स्पर्श/कड़ी चोट होने किया 'दिखाएँ छू लेती है' और 'शो सूचक स्थान' सक्षम करें।

+0

स्थान और संकल्प के बारे में मैंने पहले से ही यह किया है, लॉग के बारे में मैंने खोज की है, मैं इसे अभी अपलोड कर दूंगा –

संबंधित मुद्दे