Select different kind of elements with one selector

Questions & Answers about Helium Scraper 3
Post Reply
Posts: 4
Joined: Thu May 30, 2019 5:49 pm

Select different kind of elements with one selector

Post by doncorleone » Fri Jan 17, 2020 12:34 am

I'm trying to make a selector that selects a button, which is an A element, but then on a different page it is a P element for whatever reason and the selector doesn't work there. When I try to add it with Add Samples to Selector I get an error that says "These are not the same kind of elements". Is there a way to avoid this error and have the same selector select both elements?

Site Admin
Posts: 510
Joined: Mon Dec 06, 2010 8:39 am

Re: Select different kind of elements

Post by webmaster » Tue Jan 21, 2020 4:51 am

There are a couple of ways to do this. One is to create a selector for each kind of element, and then use the + operator whenever you want to select any of the elements:

Code: Select all

   ·  Select.ButtonA
   ·  Select.ButtonP
If you're using a wizard you will only be able to select a specific selector, so just select any selector and then replace it with the code above.

The other option is to double click your selector to edit the JSON code and delete the full "tag" property (all 3 lines, including the comma), and then pressing the Save button. After doing this, you'll be able to add any elements to this selector, regardless of the tag name.
Juan Soldi
The Helium Scraper Team

Post Reply