"Cannot access com.google.common.base.Predicate" in Selenide


I am new to Selenide and I tried to follow this video: https://vimeo.com/107647158 at 8:05 – part

$("#ires li.g").shouldHave

is underlined with "Cannot access com.google.common.base.Predicate" error.

I tried some Google and found this: What is the fix for class file for com.google.common.base.predicate not found? which pointed to https://github.com/google/guava page.

I added dependency to pom:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

          <executable>C:\Program Files\Java\jdk1.8.0_131\bin\javac</executable>

But it didn’t resolve my issue.

I also checked %JAVA_HOME% and path to JDK/JRE and seems to be fine. What I missed?


Oh, duck method…

I added import com.google.common.base.Predicate; on the top and IntelliJ IDEA posted on red Predicate part with a tip to add it to a classpath

Sorry for dumb question

Answered By – Michal

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published