Find element Problem "Node Created an empty data table"

Hi everyone :blush:

I want to search and get the result of a movie in “https://www.rottentomatoes.com/” site.

I have passed the process of the search button and clicking on that. But I have issues in the “search page result” when I want to extract the information of the result films, regarding to add the elements on the “find element” Node, the warning of “Node Created an empty data table” has been displayed.

I would be grateful if anyone can help me regarding this issue.
rottentomatoes-search.knwf (24.9 KB)

Thanks
Mona

1 Like

Hi Mona,

I faced this error when I was using CSS selector.
I think @qqilihq can help us with this problem.

1 Like

Mentioned site uses a (nested) shadow DOM:

(note to myself: this should be mentioned as case (d) in the hint dialog). So you’ll need to use specific treatment for querying into the shadow DOM. Check e.g. here for a solution:

–Philipp

2 Likes

Addendum:

I just tried this on a simple example (here via this):

You’ll want to select the shadow DOM container using Find Elements, and then use an Execute JavaScript node with the following code:

// pass the shadow dom container as argument (WebElement cell)
const shadowDomContainer = arguments[0];

// use your selector to match the element within the dom
const element = shadowDomContainer.shadowRoot.querySelector('.info');

// result will be the retrieved WebElement
return element;

Hope this helps!

2 Likes

rottentomatoes-search.knwf (32.3 KB)

2 Likes

Hi @qqilihq,

Appreciated for your helpful information, whole new insights have been found out thanks to you.

Based on your response and @mehrdad_bgh 's workflow, just the first movie of the search result could been extracted but I am going to extract all of the results, thus I’m working on it yet.

If that’s okay, I will get back to you whenever the answer wouldn’t show up.

Thanks again
Mona

1 Like