Created
April 28, 2021 21:24
-
-
Save kblok/8757d7bb80af89c41c016b913d4446dc to your computer and use it in GitHub Desktop.
fille-frame.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import json | |
from playwright.sync_api import sync_playwright | |
def run(playwright): | |
browser = playwright.chromium.launch(headless=False) | |
page = browser.new_page() | |
page.goto("https://cdpn.io/hardkoded/fullpage/jOyobqJ") | |
iframe0 = page.query_selector('#result').content_frame() | |
iframe1 = iframe0.query_selector('xpath=//iframe[@title="payment"]').content_frame() | |
iframe1.fill('//*[@id="cardCvc-input"]', '123') | |
iframe1.fill('//*[@id="cardCvc-input"]', '122') | |
with sync_playwright() as playwright: | |
run(playwright) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment