Люди добрые - помогите мне решить проблему - пытаюсь автоматизировать сайт и не получаеться решить одну ошибку - даже не могу понять от чего она и что не так?
package com.company;
import org.openqa.selenium.*;
import org.openqa.selenium.chrome.ChromeDriver;
import org.testng.annotations.Test;
import java.util.ArrayList;
import java.util.HashMap;
public class Main {
@Test
public static void main(String[] args) throws InterruptedException {
System.setProperty("webdriver.chrome.driver", "/Users/denisnicula/Documents/Chromedriver");
WebDriver driver = new ChromeDriver();
driver.get("https://credithub.ru/zaimy");
WebElement offerBlock;
(Ругаеться на жту строку и я не могу понять что с ней не так ?)offerBlock = driver.findElement(By.xpath("//div[contains(text(),'" + "offerName" + "')]/ancestor::div[@class='feed-item']"));
offerBlock.findElement(By.xpath(".//div[@class='feed-more-btn arrow_down']")).click();
WebElement link = offerBlock.findElement(By.xpath(".//a[@class='btn btn-1 btn_blue']"));
link.click();
HashMap<String, String> offers = new HashMap<String, String>();
offers.put("vivus", "http://example.com");
offers.put("moneyman", "http://example.com");
for (String offerName : offers.keySet()) {
String offerLink = offers.get(offerName);
System.out.println(offerName + " - " + offerLink);
}}}