For the below code of setting chromeoptions using addArguments() method is giving following error Code: This code was working fine with older version of Selenium dependency but now i upgraded all my dependencies to new versions for some reasons and it’s not working Selenium Dependencies: build.gradle: Java version I’m using: Chrome Version: Chrome Driver Version: Answer You miss the following