Element click issues

Hello,

I'm having trouble trying to create a selector that will click on all "expand" buttons in a page, then select all the text and images that appear from those buttons.
I double checked the main selector and can't find any issues with it. However, I can't create the sub selectors to scrape the text and images under it; the error message is always the same no matter what i try: "Parent element not found".

https://bladeball.fandom.com/wiki/Sword_Skins

Here's what the selector looks like:

{"_id":"bladeball","startUrl":["https://bladeball.fandom.com/wiki/Sword_Skins"],"selectors":[{"clickActionType":"real","clickElementSelector":"td","clickElementUniquenessType":"uniqueText","clickType":"clickMore","delay":2000,"discardInitialElements":"do-not-discard","id":"expand","multiple":true,"parentSelectors":["_root"],"selector":".mw-collapsible-toggle-collapsed a","type":"SelectorElementClick"}]}

like this?

{"_id":"bladeball","startUrl":["https://bladeball.fandom.com/wiki/Sword_Skins"],"selectors":[{"clickActionType":"real","clickElementSelector":".mw-collapsible-toggle-collapsed a","clickElementUniquenessType":"uniqueCSSSelector","clickType":"clickOnce","delay":1000,"discardInitialElements":"do-not-discard","id":"expand","multiple":true,"parentSelectors":["_root"],"selector":"body","type":"SelectorElementClick"},{"id":"element","multiple":true,"parentSelectors":["expand"],"selector":"[data-index-number] tr:nth-of-type(n+2)","type":"SelectorElement"},{"id":"skin","multiple":false,"parentSelectors":["element"],"regex":"","selector":"td:nth-of-type(1)","type":"SelectorText"},{"id":"desc","multiple":false,"parentSelectors":["element"],"regex":"","selector":"td:nth-of-type(2)","type":"SelectorText"},{"extractAttribute":"src","id":"img","multiple":false,"parentSelectors":["element"],"selector":"td:nth-of-type(3) img","type":"SelectorElementAttribute"},{"id":"obtain","multiple":false,"parentSelectors":["element"],"regex":"","selector":"td:nth-of-type(4)","type":"SelectorText"}]}
1 Like

Almost! For some reason it's not getting all the image URLs, only the first two, then it goes like this all the way. I made this small change in the img selector, and it worked! Thank you so much, don2010!

{"_id":"bladeball_help","startUrl":["https://bladeball.fandom.com/wiki/Sword_Skins"],"selectors":[{"clickActionType":"real","clickElementSelector":".mw-collapsible-toggle-collapsed a","clickElementUniquenessType":"uniqueCSSSelector","clickType":"clickOnce","delay":1000,"discardInitialElements":"do-not-discard","id":"expand","multiple":true,"parentSelectors":["_root"],"selector":"body","type":"SelectorElementClick"},{"id":"element","multiple":true,"parentSelectors":["expand"],"selector":"[data-index-number] tr:nth-of-type(n+2)","type":"SelectorElement"},{"id":"skin","multiple":false,"parentSelectors":["element"],"regex":"","selector":"td:nth-of-type(1)","type":"SelectorText"},{"id":"desc","multiple":false,"parentSelectors":["element"],"regex":"","selector":"td:nth-of-type(2)","type":"SelectorText"},{"id":"img","linkType":"linkFromHref","multiple":false,"parentSelectors":["element"],"selector":"a.image","type":"SelectorLink"},{"id":"obtain","multiple":false,"parentSelectors":["element"],"regex":"","selector":"td:nth-of-type(4)","type":"SelectorText"}]}