Page 1 of 1

Can't find my selector on the list of actions

Posted: Thu May 30, 2019 5:53 pm
by doncorleone
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?

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

Posted: Thu May 30, 2019 11:47 pm
by webmaster
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).

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

Posted: Fri May 31, 2019 4:44 pm
by doncorleone
That worked thanks!