Tests in parallel execution due to Thread safety error, have used ThreadLocal concept in the framework | Selenium Forum
R
Rinku Pahuja Posted on 31/01/2024

Framework - POM, Selenium + Java 

using latest versions

Exception:
Test failed : org.openqa.selenium.WebDriverException: Thread safety error; this instance of WebDriver was constructed on thread TestNG-test=Script1-3 (id 21) and is being accessed by thread TestNG-test=Script1-1 (id 19)This is not permitted and *will* cause undefined behaviour Build info: version: '4.15.0', revision: '1d14b5521b' System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.7' Driver info: driver.version: unknown