How to figure out the proper variable type of fx a selenium webdriver method?
I am learning about selenium right now, and was wondering how we know what variable type we should give when we use new methods we never used before.
For example
driver.findElement(By.name("search"));
- how do I figure out what type the variable should be? I know its WebElement
but only because I am watching a tutorial. This is just one example, and could be any other Java method or library.
In the two pictures, you can see that the instructor (white picture) hovers over the driver.
part and he can see that it is type WebElement
. When I do the same, it just says its WebDriver driver = new ChromeDriver();
.... He uses Eclipse, while I use IntelliJ.2 Replies
⌛
This post has been reserved for your question.
Hey @Steadhaven! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
Post Closed
This post has been closed by <@305362010374406144>.