<p dir="auto">Hi, I would like to have an option to be able to add an apiPort, same as baseUrl to playwright.config what could possibly improve the way I can manage the projects - also helping to handle api testing.</p>
<p dir="auto">Let us know what functionality you'd like to see in Playwright and what your use case is.<br>
Do you think others might benefit from this as well? <strong>Yes</strong></p>
<p dir="auto">From time to time, we like to test our API as well with Playwright. Sometimes the format is different from the baseUrl, that's why an <code class="notranslate">apiEndpoint</code> might be beneficial. Of course, there are some workarounds, but they are less neath than how baseUrl works. (and <code class="notranslate">apiEndpoint</code> should work)</p>
<p dir="auto">My example: (is configured as baseUrl)<br>
Web application URL: <code class="notranslate">https://practicesoftwaretesting.com</code></p>
<p dir="auto">API endpoint: <code class="notranslate">https://api.practicesoftwaretesting.com</code></p>
<p dir="auto">The various API request function should try to get the value of <code class="notranslate">apiEndpoint</code> first and then append what is left.. ( similar to <code class="notranslate">.goto()</code>)</p>
<p dir="auto">Responds with a thumbs up if you like this addition.</p>