Could it be that your code was getting called multiple times or in multiple threads? I'm not sure but I can imagine that with Selenium. You might want to search for "thread-safe singleton" in Kotlin when trying to fix it again, quite possible the object approach isn't by default, but I'm sure there's an easy fix.
Ah that is a good point to make. It is possible I set it up with parallel running without thinking about it! Will do and thanks for the tip!
That makes a lot of sense. Thanks Cihat for the explanation. Although, kotlin object is actually thread safe. kotlinlang.org/docs/object-declara...
That is what I thought, but if it is spinning up multiple threads, maybe that is why it is spinning up multiple browser instances. I’ll have to look into it again when I get time away from Android studies lol.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.