Apple is especially good at nailing this quality in their physical products. I am constantly opening and closing my AirPods…

UX Design literally means User Experience, translating into Portuguese: “User Experience”. This is a strategy with actions that go beyond…

Facing issue to read content after clicking an element in Selenium. I have tried with below code:

if(webElement2.isDisplayed()) {
webElement.explicitWaitToClickElement(4,webElement);
webElement2.click();
}

String tagContent = (String) ((JavascriptExecutor)
BrowserUtilities.getDriver()).executeScript(“return arguments[0].innerText;”, webElement2);

I am trying to get the name and the price information from this website with XPath. When i write my XPath expression down in the search bar it locates correctly in the chrome. But in VSC it doesn’t work. I get nameHtml is null error. This is the only element that has style__Text-sc-__sc-1nwjacj-0 iwTTHJ sc-dd9e2587-8 dsYcan class. Is there a problem with my expression or the code ?
Thanks

my code:
public class Main {

public static HtmlPage getDocument(String url) {
HtmlPage page = null;
try (final WebClient webClient = new WebClient()) {
webClient.getOptions().setCssEnabled(false);
webClient.getOptions().setJavaScriptEnabled(false);
page = webClient.getPage(url);
} catch (IOException e) {
e.printStackTrace();
}
return page;
}

public static void main(String[] args) throws IOException {

WebClient webClient = new WebClient();
webClient.getOptions().setCssEnabled(false);
webClient.getOptions().setJavaScriptEnabled(false);

HtmlPage page = getDocument(“https://getir.com/en/category/fruits-veg-tBYm30SlS9/”);
HtmlElement nameHtml = page.getFirstByXPath(“//div[@class = ‘style__Text-sc-__sc-1nwjacj-0 iwTTHJ sc-dd9e2587-8 dsYcan’]”);

System.out.println(nameHtml.asNormalizedText());}