I ran into an issue, where I need to call a variable created in one java class in another java class.
Course.java
public class Course {
public String courseName;
SecondCourse.java
public class SecondCourse {
Course courseName;
@Before
public void setUp() throws Exception {
courseName = new Course();
Eventhough, I have set up it like this, the varible call doesn't work in SecondCourse.java Class. Have I missed something? Can you help me?
I'm trying to call
driver.findElement(By.xpath("//div/input")).sendKeys(courseName);
in the SecondCourse.java class. But gives me the error sendKeys(java.lang.CharSequence...) in org.openqa.selenium.WebElement cannot be applied