Hi
Hope theee steps would help you resolve this
—first let’s use a ELEMENT EXISTS activity, click on next button as a selector And get the output of boolean type which denotes whether next button exists or not
—now use a IF condition and mention as
ElementExists = True
If true it will go to THEN block where we can have one EXTRACT STRUCTURES DATATABLE which will use next button
If the condition is false it will go to ELSE block where we can have another different EXTRACT STRUCTURED DATATABLE activity which will not use next button
This will make the flow dynamic
Cheers @pari_patel