When I included selenium.setSpeed("2000");
inside my void main i got the syntax error "selenium cannot be resolved"
When I placed it outside my void main and inside my class I got the error :
"Multiple markers at this line - Syntax error on token ",", < expected - Syntax error, insert "SimpleName" to complete QualifiedName - Syntax error on token ".", @ expected after this token - Syntax error, insert ")" to complete MethodDeclaration - Syntax error, insert "Identifier (" to complete MethodHeaderName"
Please do help me resolve this issue.
The ancient versions of Selenium of-coarse had a method as setSpeed()
but this method had been deprecated long back. setSpeed()
was used to control the speed of each step of your Automation Script. As the purpose of Automated Testing is to reduce the Validation Time so setting the speed of each line of your script execution through setSpeed()
was contradictory. Hence setSpeed()
was deprecated.
Incase you want to wait for a certain condition you can use either Implicit Wait or Explicit Wait i.e. WebDriverWait Class in-conjunction with ExpectedConditions.