I'm doing exactly what the website says but it results in 4 errors...
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
From your code, i didn't see any imports and class name was different from filename(As @yong mentioned in his comment).
Your Java file name should always reflect the public class defined within that file. Otherwise, you will get a compiler error.
Modify your code like this : (you had a typo, firstPackage)
There are exactly 4 errors as follows:
Error: ChromeDriver cannot be resolved to a type
Solution: You need to add the following import
Error: Test cannot be resolved to a type
Solution: You need to add the following import
Error: The public type ChromeTest must be defined in its own file
Solution: Your filename is Chrom.java but your classname is ChromeTest where as both should have been similar. Change them as identical.
Here you can find a discussion on “The public type must be defined in its own file” but the file name and the class name is the same
Error: WebDriver cannot be resolved to a type
Solution: You need to add the following import
Best Practice