How to declare global variables using TestNG/Selenium/Java?
I am totally new in automated testing. For practice purposes, I want to create tests for the contact form in Selenium with TestNG. This is the page I am using for practice. I created several test cases but I am not sure how to declare variables that I will be calling later on (in the same class). The code is below, I would like to declare 'Email', 'ErrorField' and 'SendButton' - all suggestions are much appreciated since I tried several ways and I am getting errors. public class FormValidation { protected static WebDriver driver; @BeforeTest() public void beforeTest() { System.setProperty("web
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.