Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Unable to run the test parallelly on 2 devices through testng (appium java) > code runs individually << failed due to unable to locate the element

Đang mở
#1,761 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
android, java
Lĩnh vực
mobile-dev, testing-qa

Hướng nghiên cứu

Bắt đầu với TestNG XML và tests.Muti_LoginTC2, sau đó kiểm tra Base2.startServer cùng các điểm vào của SplashPage, GetVerificationCodePage và OTPVerificationPage. Tái hiện login1 và login2 song song trên hai thiết bị được liệt kê và ghi lại lần tìm phần tử bị lỗi; được xem là hoàn tất khi cả hai luồng đều tìm thấy các phần tử của mình và hoàn thành mà không can thiệp lẫn nhau.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

testng XML :

Test :
package tests;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.lang.reflect.Method;
import java.util.Properties;
import java.util.concurrent.TimeUnit;

import org.testng.Assert;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;

//import Practice.BluesecureTC.Base1;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import pages.GetVerificationCodePage;
import pages.InviteUserPage;
import pages.OTPVerificationPage;
import pages.SplashPage;
import utils.Base;
import utils.Base2;

public class Muti_LoginTC2 extends Base2{

@BeforeTest()
public void killAllnodes() throws IOException, InterruptedException {  
	Runtime.getRuntime().exec("taskkill /F /IM node.exe");
	Thread.sleep(3000);
}

// @AfterTest
// public void stop()
// {
// stop_service();
// }
//

@Test 
public void login1() throws IOException, InterruptedException
{
	
	
	AndroidDriver<AndroidElement> driver1 = startServer("8244","Bluesecure","RZ8R915W2KW");
	driver1.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
	System.out.println("Thread one is" +Thread.currentThread().getId());
	
	SplashPage s1=new SplashPage(driver1);
	
	GetVerificationCodePage verify = new GetVerificationCodePage(driver1);
	OTPVerificationPage otp = new OTPVerificationPage(driver1);
	
	s1.naviagte();

// String expected="android.widget.ScrollView";
// String actual =

	verify.allow_permissions();
	verify.login("8755875532");
	otp.verifyOtp();
	
}

@Test
public void login2() throws IOException, InterruptedException
{
	AndroidDriver<AndroidElement> driver2 = startServer("8241","Bluesecure","HA4L6TGQGET4CMDI");
	//AndroidDriver<AndroidElement> driver = capabilities("Bluesecure");
	driver2.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
	System.out.println("Thread two  is" +Thread.currentThread().getId());
	
	SplashPage s2=new SplashPage(driver2);
	
	
	GetVerificationCodePage verify2 = new GetVerificationCodePage(driver2);
	OTPVerificationPage otp2 = new OTPVerificationPage(driver2);
	
	s2.naviagte();

// String expected="android.widget.ScrollView";
// String actual =

	verify2.allow_permissions();
	verify2.login("9544696100");
	otp2.verifyOtp();

//
}

// @Test
// public void login3() throws IOException, InterruptedException
// {
// AndroidDriver driver = startServer("8997","Bluesecure","RZ8R915W2KW");
// //AndroidDriver driver = capabilities("Bluesecure");
// driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
//
//
// SplashPage s1=new SplashPage(driver);
//
// GetVerificationCodePage verify = new GetVerificationCodePage(driver);
// OTPVerificationPage otp = new OTPVerificationPage(driver);
//
// s1.naviagte();
//// String expected="android.widget.ScrollView";
//// String actual =
//
// verify.allow_permissions();
// verify.login("9544696100");
// otp.verifyOtp();
////
// }
}

Ngôn ngữ chính
Java
Star
1.3k
Fork
755
Merge trung bình
5 ngày 14 giờ
Pull request đã merge (30 ngày)
8

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của appium/java-client

Tất cả issue của appium/java-client

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.