0

I have looked online and in Stack Overflow but cannot find a solution to my problem.

I need to execute multiple files written in Python using Selenium. I'd like to do this asynchronously or in parallel. Please note that my files are not necessarily tests.

Ideally I'd like to accomplish the following:

  1. Execute my files that are stored in a single directory
  2. This can be done asynchronously or in parallel
  3. I cannot use Sauce Labs or similar web tools

I have written files before using Robot Framework and have had success executing multiple files using Pabot but can't seem to find a similar solution for executing multiple files with a Python module. Is Selenium Grid a good approach for something like this?

Freddy
  • 511
  • 2
  • 9
  • 19
  • There are lots of tools that run commands in parallel which makes this a poor fit for stackoverflow. Maybe superuser.com? One option is a python program with threads that call subprocess.run. – tdelaney Jan 26 '23 at 01:22
  • To execute scripts in parallel (each script in a separate selenium browser window) look here https://stackoverflow.com/a/72574108/8157304 You should modify the function `get_cost` in such a way that for a given parameter it executes a different script (for example if `i=0` then execute this script, if `i=1` execute that, and so on) – sound wave Jan 26 '23 at 09:28
  • @soundwave thank you for your advice. I will review the link you shared and also consider your suggestions. – Freddy Jan 26 '23 at 18:17

0 Answers0