I am new to selenium tests and I am currently watching some youtube videos using maven.
Today I tried a few codes and worked fine but when accessing one store page and trying to search a product it gives me "Access Denied" message So I tried a few ways to open chrome instead of chromedriver.
But I gave up and was willing to try another webpage. But now chromedriver wont open (gives error message). operadriver, geckodriver and etc will immediately close after launch.
I am getting this error:
java.lang.NoSuchMethodError: 'com.google.common.collect.ImmutableMap com.google.common.collect.ImmutableMap.of(java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object)'
I tried looking in a lot of places but most said it was guava version, I dont use guava, even though I tried adding it to dependencies...
My code is this:
public class TestYoutubeClass {
WebDriver driver;
@Before
public void runDriver(){
WebDriver driver = new ChromeDriver();
driver.get("http://www.kabum.com.br");
I tried starting from the beginning and nothing worked.
I am using IntelliJ
On pom.xml
I added: junit; selenium-java
and webdrivermanager
.
Every help is really appreciated.