Skip to content

Commit 64b52fd

Browse files
committed
ACQE-8626: [MFTF Test] Fix for paypal Test Failure - Login Screen
- Paypal asking login using otp then click on button login using password
1 parent 3026734 commit 64b52fd

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

app/code/Magento/Paypal/Test/Mftf/ActionGroup/StorefrontLoginToPayPalExpressCheckoutPayFlowEditionActionGroup.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
<waitForElementVisible selector="{{PayPalPaymentSection.email}}" stepKey="waitForEmailField" />
2121
<fillField selector="{{PayPalPaymentSection.email}}" userInput="{{credentials.magento/PAYPAL_LOGIN}}" stepKey="fillEmail"/>
2222
<click selector="{{PayPalPaymentSection.nextButton}}" stepKey="clickNext"/>
23+
<waitForPageLoad stepKey="waitForNextPageLoad"/>
24+
<conditionalClick selector="{{PayPalPaymentSection.usePasswordInsteadButton}}" dependentSelector="{{PayPalPaymentSection.password}}" visible="false" stepKey="clickUsePasswordInsteadIfPasswordFieldNotVisible"/>
2325
<waitForElementVisible selector="{{PayPalPaymentSection.password}}" stepKey="waitForPasswordFieldToBeVisible" />
2426
<fillField selector="{{PayPalPaymentSection.password}}" userInput="{{credentials.magento/PAYPAL_PWD}}" stepKey="fillPassword"/>
2527
<waitForElementClickable selector="{{PayPalPaymentSection.loginBtn}}" stepKey="waitForLoginField"/>

app/code/Magento/Paypal/Test/Mftf/ActionGroup/StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
<clearField selector="{{PayPalPaymentSection.email}}" stepKey="clearEmailField"/>
2424
<fillField selector="{{PayPalPaymentSection.email}}" userInput="{{credentials.magento/PAYPAL_LOGIN}}" stepKey="fillEmail"/>
2525
<click selector="{{PayPalPaymentSection.nextButton}}" stepKey="clickNext"/>
26+
<waitForPageLoad stepKey="waitForNextPageLoad"/>
27+
<conditionalClick selector="{{PayPalPaymentSection.usePasswordInsteadButton}}" dependentSelector="{{PayPalPaymentSection.password}}" visible="false" stepKey="clickUsePasswordInsteadIfPasswordFieldNotVisible"/>
2628
<waitForElementVisible selector="{{PayPalPaymentSection.password}}" stepKey="waitForPasswordField"/>
2729
<click selector="{{PayPalPaymentSection.password}}" stepKey="focusOnPasswordField"/>
2830
<fillField selector="{{PayPalPaymentSection.password}}" userInput="{{credentials.magento/PAYPAL_PWD}}" stepKey="fillPassword"/>

app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/PayPalPaymentSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,6 @@
3737
<element name="changeShippingAddressButton" type="button" selector="//button[@data-dd-action-name='Ship to Tab']"/>
3838
<element name="shippingAddressDropdown" type="select" selector="(//div[@data-dd-action-name='Shipping Address'][.//span[contains(normalize-space(.), '{{ShippingAddress}}')]])[1]" parameterized="true"/>
3939
<element name="selectedShippingAddress" type="text" selector="//div/p[contains(text(), '{{selectedAddress}}')]" parameterized="true"/>
40+
<element name="usePasswordInsteadButton" type="button" selector="(//button[text()='Use Password Instead'] | //a[text()='Try another way'])[1]"/>
4041
</section>
4142
</sections>

0 commit comments

Comments
 (0)