Codeception with Paypal Sandbox: Cannot select injected Ajax Fields
<p>Problem: When I am redirected from my domain to sandbox.paypal.com, I can't select the input fields using XPATH selectors. An error saying element not found gets thrown up. I have tried using a js selector as well but I get the following error: Cannot set property 'value' of null. </p>

<p>I have tried manually visiting the page and applying the xpath, and it works perfectly fine. Any ideas?</p>

<p>Here's the Xpath script in question:</p>

<pre><code>'//input[@name="login_email"]';
</code></pre>

<p>Here's the JS Script that also fails:</p>

<pre><code>return document.querySelector('login_emaildiv input';
</code></pre>

<p>I have noticed that the form is injected into the DOM. Would anyone know a workaround? </p>

<p>I have tried this with the chromedriver as well as the firefox one.</p>