abbiamo il seguente codice sulla pagina che presenta una condizione angolare ng-if.Il DOM del selenio non viene modificato dopo l'esecuzione della condizione Angular ng-if
<p ng-if="!old_email" style="line-height: 20px; font-weight: normal;"><b>Hi,</b><br><br>
We have created a new account with ’{{ new_email }}‘, for you on<br> Plobal Apps to preview and test your app and mailed you the details. Please check your inbox.
</p>
<p ng-if="new_user && old_email" style="line-height: 20px; font-weight: normal;"><b>Hi,</b><br><br>
We have created a new account with ’{{ new_email }}‘, for you on<br> Plobal Apps to preview and test your shopify app and mailed you the details. Please check your inbox.
<br />
You have been logged out of the previous account with ’{{ old_email }}‘.
</p>
<p ng-if="existing_user && old_email" style="line-height: 20px; font-weight: normal;"><b>Hi,</b><br><br>
We have logged you in with ’{{ new_email }}‘, on Plobal Apps to preview and test your shopify app.
<br />
You have been logged out of the previous account with ’{{ old_email }}‘.
</p>
ng-if condizione eseguirà dinamicamente e tag di prelievo secondo i requisiti. Ho osservato sulla pagina html che tutto funziona. Ho osservato il seguente codice html dopo aver ispezionato la pagina.
<!-- ngIf: !old_email -->
<!-- ngIf: new_user && old_email -->
<!-- ngIf: existing_user && old_email --><p class="ng-binding ng-scope" ng-if="existing_user && old_email" style="line-height: 20px; font-weight: normal;"><b>Hi,</b><br><br>
We have logged you in with ’[email protected]‘, on Plobal Apps to preview and test your shopify app.
<br>
You have been logged out of the previous account with ’[email protected]‘.
</p><!-- end ngIf: existing_user && old_email -->
se stampo innerHTML dell'elemento genitore da selenio poi ho trovato
<p ng-if="!old_email" style="line-height: 20px; font-weight: normal;"><b>Hi,</b><br><br>
We have created a new account with ’{{ new_email }}‘, for you on<br> Plobal Apps to preview and test your app and mailed you the details. Please check your inbox.
</p>
<p ng-if="new_user && old_email" style="line-height: 20px; font-weight: normal;"><b>Hi,</b><br><br>
We have created a new account with ’{{ new_email }}‘, for you on<br> Plobal Apps to preview and test your shopify app and mailed you the details. Please check your inbox.
<br>
You have been logged out of the previous account with ’{{ old_email }}‘.
</p>
<p ng-if="existing_user && old_email" style="line-height: 20px; font-weight: normal;"><b>Hi,</b><br><br>
We have logged you in with ’{{ new_email }}‘, on Plobal Apps to preview and test your shopify app.
<br>
You have been logged out of the previous account with ’{{ old_email }}‘.
</p>
Come per la mia comprensione, Selenio DOM non è cambiato dopo l'esecuzione di angolare ng-se la condizione. Per favore aiutatemi se qualcuno sa come dire al selenio di eseguire la condizione angolare ng-if e quindi cercare l'elemento.
È possibile considerare l'utilizzo del rapportatore. È costruito sopra il selenio e supporta eventi angolari. http://angular.github.io/protractor/#/ –
Hai abbastanza attesa prima di ottenere il innerHTML? – Buaban