How to split a list data to multiple thread ?

Support
  • I have a list data and i want to use loop to get each element of list. But when I use multiple thread, this loop will be call multiple times as same.
    How to split a list to number of use's thread ?

  • First, you have to use "{{BrowserThread}}" variable and "Element Number" command. So you can create a new variable where "[[SUBLIST_LENGTH]]" can be calculate by ([[MAIN_LIST_LENGTH]]/{{BrowserThreads}}). Lets say, you have list contains 10,000 URLs and you want to run 5 browsers threads. So "[[SUBLIST_LENGTH]]" will be (10000/5)= 2000 (check screenshot_1)

    Now, you can split your MAIN_LIST in using built in variable "[[Thread Index]]" and "SUBLIST" command. (check screenshot_2)

    screenshot_2.png screenshot_1.png

  • 1 Votes
    2 Posts
    650 Views
  • Threads communication

    Support
    0 Votes
    2 Posts
    495 Views
  • Issue With threads.

    Support
    0 Votes
    4 Posts
    742 Views
  • Regex match multiple groups

    Support
    0 Votes
    5 Posts
    777 Views
  • 0 Votes
    4 Posts
    849 Views