Run Asynchronous Calls Against WebDrivers

<p>Recently, I was looking for Python libraries capable of executing asynchronous commands in WebDrivers, such as&nbsp;<a href="https://chromedriver.chromium.org/downloads" rel="noopener ugc nofollow" target="_blank">ChromeDriver</a>&nbsp;or&nbsp;<a href="https://firefox-source-docs.mozilla.org/testing/geckodriver/index.html" rel="noopener ugc nofollow" target="_blank">GeckoDriver</a>. Unfortunately, none of them worked, so I decided to create my own library. Hence,&nbsp;<a href="https://github.com/douglasdcm/caqui" rel="noopener ugc nofollow" target="_blank">Caqui</a>&nbsp;was born.</p> <p>I&rsquo;ve used it in another&nbsp;<a href="https://github.com/douglasdcm/job-conqueror" rel="noopener ugc nofollow" target="_blank">personal project</a>&nbsp;to search for over 2,000 job openings on over 200 recruitment websites. I reduced the time by at least 30% from the synchronous version to the asynchronous one, just by using three concurrent instances of WebDrivers. I still managed to create&nbsp;<a href="https://github.com/douglasdcm/caqui" rel="noopener ugc nofollow" target="_blank">Caqui</a>&nbsp;as an agnostic library that, in addition to executing commands in WebDrivers, runs commands in Winium, and tests Windows applications without installing anything additional. I&rsquo;ll tell you a little more about it.</p> <p>I experimented with Jmeter to test a Desktop application a few years ago. I talk more about the experiment in this&nbsp;<a href="https://medium.com/@douglas.dcm/testing-windows-apps-with-http-rest-b4e8f80f8b7e" rel="noopener">article</a>, so I won&rsquo;t go on too long here. But basically, the experiment was to run Winium commands remotely using REST API to test the Windows Calculator. I used this knowledge to make&nbsp;<a href="https://github.com/douglasdcm/caqui" rel="noopener ugc nofollow" target="_blank">Caqui</a>&nbsp;run commands on&nbsp;<a href="https://github.com/2gis/Winium.Desktop" rel="noopener ugc nofollow" target="_blank">Winium</a>&nbsp;and WebDrivers, as described above. For this to work, it was necessary that the WebDriver be raised as a server, and its URL be used in your product, for example, a crawler.</p> <p>Let&rsquo;s take&nbsp;<a href="https://chromedriver.chromium.org/downloads" rel="noopener ugc nofollow" target="_blank">ChromeDriver</a>&nbsp;as an example. Did you know you can run it as an ordinary shell script? By doing this, a server is raised, and it listens for requests on port 9999.</p> <p><a href="https://betterprogramming.pub/run-asynchronous-calls-to-webdrivers-e16b98b26fd9">Website</a></p>