I have a good selenium automation framework, which is used across different projects without any issue if I run tests in single thread.
Recently I tried to enhance my framework to enable parallel executions, but I am finding it difficult. So far I am able to resolve different issues I encountered (listed below), but getting more issues as I progress.
I am thinking to write a new framework considering concurrency at every steps. Please can someone suggest best practices (do's and dont's) to be followed.
Few of the issues I encountered and resolved so far:
a) Static Webdriver instance of Browser factory class did not work
--- adopted Factory design pattern with ThreadLocal, and it worked
b) Multiple instances of chrome were not working if used certain with chrome options
-- disabled those options
c) Was creating a new pdf file (after deleting the old one) to upload for a given requirement. Encountered a situation where a thread deleted a file created by another thread before the upload.
there are more similar issues....