If statement to check for run error?

Support
  • Hello, this is my first time using the "if" portion of BAS. I would like to have an IF statement that checks if their is a run error, such as "Failed to wait for element >CSS>>" etc.. and if there is this error, it removes a certain line from a text file.

    Basically, I have a text file called accounts.txt with usernames and my script will try to login to these, I want it to be able to delete the lines/accounts where the login was unsuccessful.

    What would be the best way to go about this? Thanks

  • @spockthe40oz Hi, BAS does that automatically, if you check this option

    0_1522182348796_DeleteAfterUsage.png

    It works like this. If you fail to login, than thread will stop with error, new thread will be started with next account.
    Meanwhile with this option BAS will also delete line automatically after thread fail.

    But you can also do that manually if you want.

    0_1522182714316_ProcessError.png

    You may also want to check ignore error and if interactive documentation which contiain a lot of usefull info.

  • Hello, thanks for the reply.

    I want to make it to where it counts the errorsand let's say when it reaches 10 it visits a certain URL link..
    How do I increase a variable by +1 every time?

    Also, would this be a correct if statement for... if {{var}} == 10

    ?

  • -1 Votes
    12 Posts
    1464 Views
  • 0 Votes
    5 Posts
    819 Views
  • Proxy processing error

    Support
    0 Votes
    1 Posts
    2263 Views
  • 0 Votes
    2 Posts
    578 Views
  • 0 Votes
    6 Posts
    1340 Views