Can't find my selector on the list of actions

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

Can't find my selector on the list of actions

Post by doncorleone » Thu May 30, 2019 5:53 pm

First of all, thanks for this great product. I'm trying to do I guess some "advanced" stuff but am running into some trouble. I have an action that looks like this:

Code: Select all

Sequence.IfAny
   ·  Select.SelectStore
   ·  Select.SelectStore
      Browser.Click
   ·  [ifEmpty]
On the [ifEmpty] space I want to select another selector and click it, but when I click the space I don't see my selector (in fact I don't see any selector at all). Why is this?

webmaster
Site Admin
Posts: 521
Joined: Mon Dec 06, 2010 8:39 am
Contact:

Re: Can't find my selector on the list of actions

Post by webmaster » Thu May 30, 2019 11:47 pm

Just right click [ifEmpty] and select Add Sibling, and then put your selector on the first placeholder and Browser.Click on the second one:

Code: Select all

Sequence.IfAny
   ·  Select.SelectStore
   ·  Select.SelectStore
      Browser.Click
   ·  Select.AnotherSelector
      Browser.Click   
The reason is not showing you any selector when there's only one placeholder is because putting a selector there would produce an invalid type:

Code: Select all

Sequence.IfAny
   ·  Select.SelectStore
   ·  Select.SelectStore
      Browser.Click
   ·  Select.AnotherSelector
Sequence.IfAny outputs the value produced by either [ifAny] or [ifEmpty], so both need to have the same data type (otherwise what would be the result type of Sequence.IfAny?). But the type is determined by the last selector, and Browser.Click returns a sequence of VOID, while Select.AnotherSelector returns a sequence of strings, (you can see this if you hover over these actions). So the editor is just not letting you produce the action above because it'd have an invalid type. Since the type is determined by the last action, adding a placeholder last allows you to put any other action above (placeholders have a placeholder type, so they match any other type).
Juan Soldi
The Helium Scraper Team

doncorleone
Posts: 4
Joined: Thu May 30, 2019 5:49 pm

Re: Can't find my selector on the list of actions

Post by doncorleone » Fri May 31, 2019 4:44 pm

That worked thanks!

Post Reply