protected function CheckoutTest::switchToElementFrame in Commerce Stripe 8
Switch to the first iframe which ancestor is the given div element id.
Parameters
string $element_id: The div element id.
Throws
\Exception
1 call to CheckoutTest::switchToElementFrame()
- CheckoutTest::fillCreditCardData in tests/
src/ FunctionalJavascript/ CheckoutTest.php - Fills the credit card form inputs.
File
- tests/
src/ FunctionalJavascript/ CheckoutTest.php, line 590
Class
- CheckoutTest
- Tests checkout with Stripe.
Namespace
Drupal\Tests\commerce_stripe\FunctionalJavascriptCode
protected function switchToElementFrame(string $element_id) {
$iframe = $this
->getSession()
->getPage()
->find('xpath', '//div[@id="' . $element_id . '"]//iframe')
->getAttribute('name');
$this
->switchToFrame($iframe);
}