Cin7 templates, Luminate templates. Walmart scripts and directory reorg
This commit is contained in:
25
Scripts/Walmart/Spark/playwright_condensed.py
Normal file
25
Scripts/Walmart/Spark/playwright_condensed.py
Normal file
@ -0,0 +1,25 @@
|
||||
import re
|
||||
import sys
|
||||
from playwright.sync_api import sync_playwright, Playwright
|
||||
|
||||
def run(playwright: Playwright):
|
||||
print("running")
|
||||
webkit = playwright.webkit
|
||||
browser = webkit.launch()
|
||||
context = browser.new_context(
|
||||
viewport={ 'width': 390, 'height': 844 }
|
||||
)
|
||||
page = context.new_page()
|
||||
BASEURL = "https://walmart.northpass.com/app/courses/"
|
||||
USERID = "?uid=7beg87y4-fh24-4929-3rt5-24kdn87s5241"
|
||||
COURSEID = sys.argv[1]
|
||||
print(COURSEID)
|
||||
print(USERID)
|
||||
example = page.goto(f"{BASEURL}{COURSEID}{USERID}")
|
||||
page.screenshot(path="/Users/normrasmussen/Downloads/screenshot1.png", full_page=True)
|
||||
page.locator('#course-mobile > div.np-top-cta.stick-to-bottom > a').click()
|
||||
page.screenshot(path="/Users/normrasmussen/Downloads/screenshot2.png").mask(['#activity-b4be181e-d2ea-46f8-bb1a-cd316c590fcf > div.Wrapper-h8th5y-0.evldAo.footer__wrapper > div > footer'])
|
||||
browser.close()
|
||||
|
||||
with sync_playwright() as playwright:
|
||||
run(playwright)
|
||||
Reference in New Issue
Block a user