Best Python code snippet using playwright-python
cmc_mobile_test.py
Source:cmc_mobile_test.py
...96 #assert page.inner_text('#__next > div > div.main-content > div.bywovg-0.kuGegY > div:nth-child(1) > div > div.sc-111rrsy-0.qbrWo > div:nth-child(6) > div > div.sc-266vnq-1.gffsPR') == 'Search'97 page.click("#__next > div > div.main-content > div.bywovg-0.kuGegY > div:nth-child(2) > div > nav > div > div:nth-child(2) > svg")98 page.click("[placeholder=\"What\\ are\\ you\\ looking\\ for\\?\"]")99 page.keyboard.press("M")100 page.wait_for_timeout(500)101 page.keyboard.press("A")102 page.wait_for_timeout(500)103 page.keyboard.press("N")104 page.wait_for_timeout(500)105 page.keyboard.press("A")106 page.wait_for_timeout(500)107 page.keyboard.press("Enter")108 109 110 111 112 #page.evaluate(113 # """114 # var intervalID = setInterval(function () {115 # scroll(0,4000);116 # }, 200);117 # """118 #)119def test_search_for_coin1(page):120 121 # Don't load images 122 page.route("**/*.svg", lambda route: route.abort()) 123 page.route("**/*.png", lambda route: route.abort()) 124 page.route("**/*.jpg", lambda route: route.abort())125 page.route("**/*.woff2", lambda route: route.abort())126 page.route("**/inpage.js", lambda route: route.abort())127 page.route("facebook.com", lambda route: route.abort())128 page.route("google.com", lambda route: route.abort())129 page.route("googletagmanager.com", lambda route: route.abort())130 page.route("jsdelivr.net", lambda route: route.abort())131 page.route("sensors.binance.cloud", lambda route: route.abort())132 133 # Goto page134 page.goto("https://coinmarketcap.com/newsletter", wait_until="domcontentloaded")135 # Check if search field has loaded, click it and enter text. 136 #assert page.inner_text('#__next > div > div.main-content > div.bywovg-0.kuGegY > div:nth-child(1) > div > div.sc-111rrsy-0.qbrWo > div:nth-child(6) > div > div.sc-266vnq-1.gffsPR') == 'Search'137 page.click("#__next > div > div.main-content > div.bywovg-0.kuGegY > div:nth-child(2) > div > nav > div > div:nth-child(2) > svg")138 page.click("[placeholder=\"What\\ are\\ you\\ looking\\ for\\?\"]")139 page.keyboard.press("M")140 page.wait_for_timeout(500)141 page.keyboard.press("A")142 page.wait_for_timeout(500)143 page.keyboard.press("N")144 page.wait_for_timeout(500)145 page.keyboard.press("A")146 page.wait_for_timeout(500)147 page.keyboard.press("Enter")148 149 150 151 152 #page.evaluate(153 # """154 # var intervalID = setInterval(function () {155 # scroll(0,4000);156 # }, 200);157 # """158 #)159def test_search_for_coin2(page):160 161 # Don't load images 162 page.route("**/*.svg", lambda route: route.abort()) 163 page.route("**/*.png", lambda route: route.abort()) 164 page.route("**/*.jpg", lambda route: route.abort())165 page.route("**/*.woff2", lambda route: route.abort())166 page.route("**/inpage.js", lambda route: route.abort())167 page.route("facebook.com", lambda route: route.abort())168 page.route("google.com", lambda route: route.abort())169 page.route("googletagmanager.com", lambda route: route.abort())170 page.route("jsdelivr.net", lambda route: route.abort())171 page.route("sensors.binance.cloud", lambda route: route.abort())172 173 # Goto page174 page.goto("https://coinmarketcap.com/newsletter", wait_until="domcontentloaded")175 # Check if search field has loaded, click it and enter text. 176 #assert page.inner_text('#__next > div > div.main-content > div.bywovg-0.kuGegY > div:nth-child(1) > div > div.sc-111rrsy-0.qbrWo > div:nth-child(6) > div > div.sc-266vnq-1.gffsPR') == 'Search'177 page.click("#__next > div > div.main-content > div.bywovg-0.kuGegY > div:nth-child(2) > div > nav > div > div:nth-child(2) > svg")178 page.click("[placeholder=\"What\\ are\\ you\\ looking\\ for\\?\"]")179 page.keyboard.press("M")180 page.wait_for_timeout(500)181 page.keyboard.press("A")182 page.wait_for_timeout(500)183 page.keyboard.press("N")184 page.wait_for_timeout(500)185 page.keyboard.press("A")186 page.wait_for_timeout(500)187 page.keyboard.press("Enter")188 189 190 page.wait_for_url("https://coinmarketcap.com/currencies/decentraland/", wait_until="domcontentloaded")191 #page.evaluate(192 # """193 # var intervalID = setInterval(function () {194 # scroll(0,4000);195 # }, 200);196 # """197 #)198 #page.click("selector=#__next > div.bywovg-1.fUzJes > div.main-content > div.sc-57oli2-0.comDeo.cmc-body-wrapper > div > div.sc-16r8icm-0.jKrmxw.container > div > div.sc-16r8icm-0.sc-19zk94m-5.bsBMhQ > div > div.pqmllm-2.hLrBVF > button:nth-child(1)")199def test_search_for_coin3(page):200 201 # Don't load images 202 page.route("**/*.svg", lambda route: route.abort()) 203 page.route("**/*.png", lambda route: route.abort()) 204 page.route("**/*.jpg", lambda route: route.abort())205 page.route("**/*.woff2", lambda route: route.abort())206 page.route("**/inpage.js", lambda route: route.abort())207 page.route("facebook.com", lambda route: route.abort())208 page.route("google.com", lambda route: route.abort())209 page.route("googletagmanager.com", lambda route: route.abort())210 page.route("jsdelivr.net", lambda route: route.abort())211 page.route("sensors.binance.cloud", lambda route: route.abort())212 213 # Goto page214 page.goto("https://coinmarketcap.com/newsletter", wait_until="domcontentloaded")215 # Check if search field has loaded, click it and enter text. 216 #assert page.inner_text('#__next > div > div.main-content > div.bywovg-0.kuGegY > div:nth-child(1) > div > div.sc-111rrsy-0.qbrWo > div:nth-child(6) > div > div.sc-266vnq-1.gffsPR') == 'Search'217 page.click("#__next > div > div.main-content > div.bywovg-0.kuGegY > div:nth-child(2) > div > nav > div > div:nth-child(2) > svg")218 page.click("[placeholder=\"What\\ are\\ you\\ looking\\ for\\?\"]")219 page.keyboard.press("M")220 page.wait_for_timeout(500)221 page.keyboard.press("A")222 page.wait_for_timeout(500)223 page.keyboard.press("N")224 page.wait_for_timeout(500)225 page.keyboard.press("A")226 page.wait_for_timeout(500)227 page.keyboard.press("Enter")228 229 230 page.wait_for_url("https://coinmarketcap.com/currencies/decentraland/", wait_until="domcontentloaded")231 #page.evaluate(232 # """233 # var intervalID = setInterval(function () {234 # scroll(0,4000);235 # }, 200);236 # """237 #)238 #page.click("selector=#__next > div.bywovg-1.fUzJes > div.main-content > div.sc-57oli2-0.comDeo.cmc-body-wrapper > div > div.sc-16r8icm-0.jKrmxw.container > div > div.sc-16r8icm-0.sc-19zk94m-5.bsBMhQ > div > div.pqmllm-2.hLrBVF > button:nth-child(1)")239def test_search_for_coin4(page):240 241 # Don't load images 242 page.route("**/*.svg", lambda route: route.abort()) 243 page.route("**/*.png", lambda route: route.abort()) 244 page.route("**/*.jpg", lambda route: route.abort())245 page.route("**/*.woff2", lambda route: route.abort())246 page.route("**/inpage.js", lambda route: route.abort())247 page.route("facebook.com", lambda route: route.abort())248 page.route("google.com", lambda route: route.abort())249 page.route("googletagmanager.com", lambda route: route.abort())250 page.route("jsdelivr.net", lambda route: route.abort())251 page.route("sensors.binance.cloud", lambda route: route.abort())252 253 # Goto page254 page.goto("https://coinmarketcap.com/newsletter", wait_until="domcontentloaded")255 # Check if search field has loaded, click it and enter text. 256 #assert page.inner_text('#__next > div > div.main-content > div.bywovg-0.kuGegY > div:nth-child(1) > div > div.sc-111rrsy-0.qbrWo > div:nth-child(6) > div > div.sc-266vnq-1.gffsPR') == 'Search'257 page.click("#__next > div > div.main-content > div.bywovg-0.kuGegY > div:nth-child(2) > div > nav > div > div:nth-child(2) > svg")258 page.click("[placeholder=\"What\\ are\\ you\\ looking\\ for\\?\"]")259 page.keyboard.press("M")260 page.wait_for_timeout(500)261 page.keyboard.press("A")262 page.wait_for_timeout(500)263 page.keyboard.press("N")264 page.wait_for_timeout(500)265 page.keyboard.press("A")266 page.wait_for_timeout(500)267 page.keyboard.press("Enter")268 269 270 page.wait_for_url("https://coinmarketcap.com/currencies/decentraland/", wait_until="domcontentloaded")271 #page.evaluate(272 # """273 # var intervalID = setInterval(function () {274 # scroll(0,4000);275 # }, 200);276 # """277 #)278 # page.click("selector=#__next > div.bywovg-1.fUzJes > div.main-content > div.sc-57oli2-0.comDeo.cmc-body-wrapper > div > div.sc-16r8icm-0.jKrmxw.container > div > div.sc-16r8icm-0.sc-19zk94m-5.bsBMhQ > div > div.pqmllm-2.hLrBVF > button:nth-child(1)")279def test_search_for_coin5(page):280 281 # Don't load images 282 page.route("**/*.svg", lambda route: route.abort()) 283 page.route("**/*.png", lambda route: route.abort()) 284 page.route("**/*.jpg", lambda route: route.abort())285 page.route("**/*.woff2", lambda route: route.abort())286 page.route("**/inpage.js", lambda route: route.abort())287 page.route("facebook.com", lambda route: route.abort())288 page.route("google.com", lambda route: route.abort())289 page.route("googletagmanager.com", lambda route: route.abort())290 page.route("jsdelivr.net", lambda route: route.abort())291 page.route("sensors.binance.cloud", lambda route: route.abort())292 293 # Goto page294 page.goto("https://coinmarketcap.com/newsletter", wait_until="domcontentloaded")295 # Check if search field has loaded, click it and enter text. 296 #assert page.inner_text('#__next > div > div.main-content > div.bywovg-0.kuGegY > div:nth-child(1) > div > div.sc-111rrsy-0.qbrWo > div:nth-child(6) > div > div.sc-266vnq-1.gffsPR') == 'Search'297 page.click("#__next > div > div.main-content > div.bywovg-0.kuGegY > div:nth-child(2) > div > nav > div > div:nth-child(2) > svg")298 page.click("[placeholder=\"What\\ are\\ you\\ looking\\ for\\?\"]")299 page.keyboard.press("M")300 page.wait_for_timeout(500)301 page.keyboard.press("A")302 page.wait_for_timeout(500)303 page.keyboard.press("N")304 page.wait_for_timeout(500)305 page.keyboard.press("A")306 page.wait_for_timeout(500)307 page.keyboard.press("Enter")308 309 page.wait_for_url("https://coinmarketcap.com/currencies/decentraland/", wait_until="domcontentloaded")310 311 #page.evaluate(312 # """313 # var intervalID = setInterval(function () {314 # scroll(0,4000);315 # }, 200);316 # """317 #)318 #page.click("selector=#__next > div.bywovg-1.fUzJes > div.main-content > div.sc-57oli2-0.comDeo.cmc-body-wrapper > div > div.sc-16r8icm-0.jKrmxw.container > div > div.sc-16r8icm-0.sc-19zk94m-5.bsBMhQ > div > div.pqmllm-2.hLrBVF > button:nth-child(1)")319def test_search_for_coin6(page):320 321 # Don't load images 322 page.route("**/*.svg", lambda route: route.abort()) 323 page.route("**/*.png", lambda route: route.abort()) 324 page.route("**/*.jpg", lambda route: route.abort())325 page.route("**/*.woff2", lambda route: route.abort())326 page.route("**/inpage.js", lambda route: route.abort())327 page.route("facebook.com", lambda route: route.abort())328 page.route("google.com", lambda route: route.abort())329 page.route("googletagmanager.com", lambda route: route.abort())330 page.route("jsdelivr.net", lambda route: route.abort())331 page.route("sensors.binance.cloud", lambda route: route.abort())332 333 # Goto page334 page.goto("https://coinmarketcap.com/newsletter", wait_until="domcontentloaded")335 # Check if search field has loaded, click it and enter text. 336 #assert page.inner_text('#__next > div > div.main-content > div.bywovg-0.kuGegY > div:nth-child(1) > div > div.sc-111rrsy-0.qbrWo > div:nth-child(6) > div > div.sc-266vnq-1.gffsPR') == 'Search'337 page.click("#__next > div > div.main-content > div.bywovg-0.kuGegY > div:nth-child(2) > div > nav > div > div:nth-child(2) > svg")338 page.click("[placeholder=\"What\\ are\\ you\\ looking\\ for\\?\"]")339 page.keyboard.press("M")340 page.wait_for_timeout(500)341 page.keyboard.press("A")342 page.wait_for_timeout(500)343 page.keyboard.press("N")344 page.wait_for_timeout(500)345 page.keyboard.press("A")346 page.wait_for_timeout(500)347 page.keyboard.press("Enter")348 page.wait_for_url("https://coinmarketcap.com/currencies/decentraland/", wait_until="domcontentloaded")349 350 351 #page.evaluate(352 # """353 # var intervalID = setInterval(function () {354 # scroll(0,4000);355 # }, 200);356 # """357 #)358 #page.click("selector=#__next > div.bywovg-1.fUzJes > div.main-content > div.sc-57oli2-0.comDeo.cmc-body-wrapper > div > div.sc-16r8icm-0.jKrmxw.container > div > div.sc-16r8icm-0.sc-19zk94m-5.bsBMhQ > div > div.pqmllm-2.hLrBVF > button:nth-child(1)")359def test_search_for_coin7(page):360 361 # Don't load images 362 page.route("**/*.svg", lambda route: route.abort()) 363 page.route("**/*.png", lambda route: route.abort()) 364 page.route("**/*.jpg", lambda route: route.abort())365 page.route("**/*.woff2", lambda route: route.abort())366 page.route("**/inpage.js", lambda route: route.abort())367 page.route("facebook.com", lambda route: route.abort())368 page.route("google.com", lambda route: route.abort())369 page.route("googletagmanager.com", lambda route: route.abort())370 page.route("jsdelivr.net", lambda route: route.abort())371 page.route("sensors.binance.cloud", lambda route: route.abort())372 373 # Goto page374 page.goto("https://coinmarketcap.com/newsletter", wait_until="domcontentloaded")375 # Check if search field has loaded, click it and enter text. 376 #assert page.inner_text('#__next > div > div.main-content > div.bywovg-0.kuGegY > div:nth-child(1) > div > div.sc-111rrsy-0.qbrWo > div:nth-child(6) > div > div.sc-266vnq-1.gffsPR') == 'Search'377 page.click("#__next > div > div.main-content > div.bywovg-0.kuGegY > div:nth-child(2) > div > nav > div > div:nth-child(2) > svg")378 page.click("[placeholder=\"What\\ are\\ you\\ looking\\ for\\?\"]")379 page.keyboard.press("M")380 page.wait_for_timeout(500)381 page.keyboard.press("A")382 page.wait_for_timeout(500)383 page.keyboard.press("N")384 page.wait_for_timeout(500)385 page.keyboard.press("A")386 page.wait_for_timeout(500)387 page.keyboard.press("Enter")388 389 page.wait_for_url("https://coinmarketcap.com/currencies/decentraland/", wait_until="domcontentloaded")390 391 #page.evaluate(392 # """393 # var intervalID = setInterval(function () {394 # scroll(0,4000);395 # }, 200);396 # """397 #)398 #page.click("selector=#__next > div.bywovg-1.fUzJes > div.main-content > div.sc-57oli2-0.comDeo.cmc-body-wrapper > div > div.sc-16r8icm-0.jKrmxw.container > div > div.sc-16r8icm-0.sc-19zk94m-5.bsBMhQ > div > div.pqmllm-2.hLrBVF > button:nth-child(1)")399def test_search_for_coin8(page):400 401 # Don't load images 402 page.route("**/*.svg", lambda route: route.abort()) 403 page.route("**/*.png", lambda route: route.abort()) 404 page.route("**/*.jpg", lambda route: route.abort())405 page.route("**/*.woff2", lambda route: route.abort())406 page.route("**/inpage.js", lambda route: route.abort())407 page.route("facebook.com", lambda route: route.abort())408 page.route("google.com", lambda route: route.abort())409 page.route("googletagmanager.com", lambda route: route.abort())410 page.route("jsdelivr.net", lambda route: route.abort())411 page.route("sensors.binance.cloud", lambda route: route.abort())412 413 # Goto page414 page.goto("https://coinmarketcap.com/newsletter", wait_until="domcontentloaded")415 # Check if search field has loaded, click it and enter text. 416 #assert page.inner_text('#__next > div > div.main-content > div.bywovg-0.kuGegY > div:nth-child(1) > div > div.sc-111rrsy-0.qbrWo > div:nth-child(6) > div > div.sc-266vnq-1.gffsPR') == 'Search'417 page.click("#__next > div > div.main-content > div.bywovg-0.kuGegY > div:nth-child(2) > div > nav > div > div:nth-child(2) > svg")418 page.click("[placeholder=\"What\\ are\\ you\\ looking\\ for\\?\"]")419 page.keyboard.press("M")420 page.wait_for_timeout(500)421 page.keyboard.press("A")422 page.wait_for_timeout(500)423 page.keyboard.press("N")424 page.wait_for_timeout(500)425 page.keyboard.press("A")426 page.wait_for_timeout(500)427 page.keyboard.press("Enter")428 429 page.wait_for_url("https://coinmarketcap.com/currencies/decentraland/", wait_until="domcontentloaded")430 431 432 #page.evaluate(433 # """434 # var intervalID = setInterval(function () {435 # scroll(0,4000);436 # }, 200);437 # """438 #)439 #page.click("selector=#__next > div.bywovg-1.fUzJes > div.main-content > div.sc-57oli2-0.comDeo.cmc-body-wrapper > div > div.sc-16r8icm-0.jKrmxw.container > div > div.sc-16r8icm-0.sc-19zk94m-5.bsBMhQ > div > div.pqmllm-2.hLrBVF > button:nth-child(1)")440def test_search_for_coin9(page):441 442 # Don't load images 443 page.route("**/*.svg", lambda route: route.abort()) 444 page.route("**/*.png", lambda route: route.abort()) 445 page.route("**/*.jpg", lambda route: route.abort())446 page.route("**/*.woff2", lambda route: route.abort())447 page.route("**/inpage.js", lambda route: route.abort())448 page.route("facebook.com", lambda route: route.abort())449 page.route("google.com", lambda route: route.abort())450 page.route("googletagmanager.com", lambda route: route.abort())451 page.route("jsdelivr.net", lambda route: route.abort())452 page.route("sensors.binance.cloud", lambda route: route.abort())453 454 # Goto page455 page.goto("https://coinmarketcap.com/newsletter", wait_until="domcontentloaded")456 # Check if search field has loaded, click it and enter text. 457 #assert page.inner_text('#__next > div > div.main-content > div.bywovg-0.kuGegY > div:nth-child(1) > div > div.sc-111rrsy-0.qbrWo > div:nth-child(6) > div > div.sc-266vnq-1.gffsPR') == 'Search'458 page.click("#__next > div > div.main-content > div.bywovg-0.kuGegY > div:nth-child(2) > div > nav > div > div:nth-child(2) > svg")459 page.click("[placeholder=\"What\\ are\\ you\\ looking\\ for\\?\"]")460 page.keyboard.press("M")461 page.wait_for_timeout(500)462 page.keyboard.press("A")463 page.wait_for_timeout(500)464 page.keyboard.press("N")465 page.wait_for_timeout(500)466 page.keyboard.press("A")467 page.wait_for_timeout(500)468 page.keyboard.press("Enter")469 470 471 page.wait_for_url("https://coinmarketcap.com/currencies/decentraland/", wait_until="domcontentloaded")472 #page.evaluate(473 # """474 # var intervalID = setInterval(function () {475 # scroll(0,4000);476 # }, 200);477 # """478 #)479 #page.click("selector=#__next > div.bywovg-1.fUzJes > div.main-content > div.sc-57oli2-0.comDeo.cmc-body-wrapper > div > div.sc-16r8icm-0.jKrmxw.container > div > div.sc-16r8icm-0.sc-19zk94m-5.bsBMhQ > div > div.pqmllm-2.hLrBVF > button:nth-child(1)")480def test_search_for_coin10(page):481 482 # Don't load images 483 page.route("**/*.svg", lambda route: route.abort()) 484 page.route("**/*.png", lambda route: route.abort()) 485 page.route("**/*.jpg", lambda route: route.abort())486 page.route("**/*.woff2", lambda route: route.abort())487 page.route("**/inpage.js", lambda route: route.abort())488 page.route("facebook.com", lambda route: route.abort())489 page.route("google.com", lambda route: route.abort())490 page.route("googletagmanager.com", lambda route: route.abort())491 page.route("jsdelivr.net", lambda route: route.abort())492 page.route("sensors.binance.cloud", lambda route: route.abort())493 494 # Goto page495 page.goto("https://coinmarketcap.com/newsletter", wait_until="domcontentloaded")496 # Check if search field has loaded, click it and enter text. 497 #assert page.inner_text('#__next > div > div.main-content > div.bywovg-0.kuGegY > div:nth-child(1) > div > div.sc-111rrsy-0.qbrWo > div:nth-child(6) > div > div.sc-266vnq-1.gffsPR') == 'Search'498 page.click("#__next > div > div.main-content > div.bywovg-0.kuGegY > div:nth-child(2) > div > nav > div > div:nth-child(2) > svg")499 page.click("[placeholder=\"What\\ are\\ you\\ looking\\ for\\?\"]")500 page.keyboard.press("M")501 page.wait_for_timeout(500)502 page.keyboard.press("A")503 page.wait_for_timeout(500)504 page.keyboard.press("N")505 page.wait_for_timeout(500)506 page.keyboard.press("A")507 page.wait_for_timeout(500)508 page.keyboard.press("Enter")509 510 511 page.wait_for_url("https://coinmarketcap.com/currencies/decentraland/", wait_until="domcontentloaded")512 #page.evaluate(513 # """514 # var intervalID = setInterval(function () {515 # scroll(0,4000);516 # }, 200);517 # """518 #)519 #page.click("selector=#__next > div.bywovg-1.fUzJes > div.main-content > div.sc-57oli2-0.comDeo.cmc-body-wrapper > div > div.sc-16r8icm-0.jKrmxw.container > div > div.sc-16r8icm-0.sc-19zk94m-5.bsBMhQ > div > div.pqmllm-2.hLrBVF > button:nth-child(1)")520def test_search_for_coin11(page):521 522 # Don't load images 523 page.route("**/*.svg", lambda route: route.abort()) 524 page.route("**/*.png", lambda route: route.abort()) 525 page.route("**/*.jpg", lambda route: route.abort())526 page.route("**/*.woff2", lambda route: route.abort())527 page.route("**/inpage.js", lambda route: route.abort())528 page.route("facebook.com", lambda route: route.abort())529 page.route("google.com", lambda route: route.abort())530 page.route("googletagmanager.com", lambda route: route.abort())531 page.route("jsdelivr.net", lambda route: route.abort())532 page.route("sensors.binance.cloud", lambda route: route.abort())533 534 # Goto page535 page.goto("https://coinmarketcap.com/newsletter", wait_until="domcontentloaded")536 # Check if search field has loaded, click it and enter text. 537 #assert page.inner_text('#__next > div > div.main-content > div.bywovg-0.kuGegY > div:nth-child(1) > div > div.sc-111rrsy-0.qbrWo > div:nth-child(6) > div > div.sc-266vnq-1.gffsPR') == 'Search'538 page.click("#__next > div > div.main-content > div.bywovg-0.kuGegY > div:nth-child(2) > div > nav > div > div:nth-child(2) > svg")539 page.click("[placeholder=\"What\\ are\\ you\\ looking\\ for\\?\"]")540 page.keyboard.press("M")541 page.wait_for_timeout(500)542 page.keyboard.press("A")543 page.wait_for_timeout(500)544 page.keyboard.press("N")545 page.wait_for_timeout(500)546 page.keyboard.press("A")547 page.wait_for_timeout(500)548 page.keyboard.press("Enter")549 550 551 page.wait_for_url("https://coinmarketcap.com/currencies/decentraland/", wait_until="domcontentloaded")552 #page.evaluate(553 # """554 # var intervalID = setInterval(function () {555 # scroll(0,4000);556 # }, 200);557 # """558 #)...
test.py
Source:test.py
...5758 # Fill [placeholder="è¾å
¥ç»å½å¯ç "]59 page.fill("[placeholder=\"è¾å
¥ç»å½å¯ç \"]", "password")60 #çå¾
5ç§61 page.wait_for_timeout(5000)6263 # Check input[type="checkbox"]64 page.check("input[type=\"checkbox\"]")6566 # Check :nth-match(input[type="checkbox"], 2)67 page.check(":nth-match(input[type=\"checkbox\"], 2)")6869 # Click button:has-text("ç» å½")70 # with page.expect_navigation(url="https://www.youzan.com/v4/shop/shop-list?#/"):71 with page.expect_navigation():72 page.click("button:has-text(\"ç» å½\")")73 except Exception as e:74 # logger.error(e)75 print(e)76 else :77 #logger.info('ç»å½åå°æå')78 pass79 # Click text='aaaaaaaaa'80 #page.click("text=aaaaaaaaa")81 #assert page.url == "https://www.youzan.com/v4/shop/select-store?hqKdtId=42561193&redirect=https%3A%2F%2Fstore.youzan.com%2Fv2%2Fdashboard%2Findex"8283 # Click text=aaaaaaaaa84 85 with page.expect_navigation(url="https://store.youzan.com/v4/dashboard"):86 with page.expect_navigation():87 page.click("text=è°é£èªç¨å¥½ç©é¦æ»åº")88 89 90 919293949596979899100101102103 i=0104 for i in(0,1):105 #è¿å
¥è®¢å页é¢106 # Click text=订å107 # with page.expect_navigation(url="https://store.youzan.com/v2/order/query#/"):108 with page.expect_navigation():109 page.click("text=订å")110 # assert page.url == "https://store.youzan.com/v2/order/query"111112 '''113 æ¥æä»å½æ¥ ååºåæ°114 '''115116 #2020-01-01117 # time_curt=datetime.datetime.strptime('2022-02-01', '%Y-%m-%d').date()-datetime.timedelta(days=1) # yyyy-MM-dd118 # time_curt=datetime.date.today() # yyyy-MM-dd119 time_curt=datetime.date.today() - datetime.timedelta(days=1) #åä¸å¤©çæ°æ®120121122 # ååºéè¦å
åæ¥ææ¡ æ£åºéè¦å
ç¹å»åæ¥ææ¡123 page.click(".zent-datepicker-trigger") #åæ¥ææ¡124 # page.click("div:nth-child(3) div .zent-datepicker-trigger") #åæ¥ææ¡125 #第ä¸æ¬¡ç¹å»éè¦ ç¹å»å½åæ¥æ年份+æ份126 page.click("text="+str(datetime.date.today().year)+"å¹´")127 page.click("text="+str(time_curt.year)+"å¹´")128129 page.click("text="+str(datetime.date.today().month)+"æ")130 page.click("text="+str(time_curt.month)+"æ")131132 #while True:133134 # page.click(".zent-datepicker-trigger") 135 # page.click("div:nth-child(3) div .zent-datepicker-trigger")136 #å¦ææ¯å¹´æ« åéè¦å
ç¹å»ä»å¹´,åç¹ä¸å¹´,åç¹1æ,åç¹12æ137 #if time_curt.month==12 and time_curt.day==31:138 #page.click("text="+str(datetime.date.today().year)+"å¹´")139 #page.wait_for_timeout(1000)140 #page.click("text="+str(time_curt.year)+"å¹´")141 #page.wait_for_timeout(1000)142 #page.click("text=1æ")143 #page.wait_for_timeout(1000)144 #page.click("text=12æ")145 #page.click('li[class=\"zent-datepicker-panel-body-cells_item zent-datepicker-panel-body-cells_available\"]>>div[class=\"zent-datepicker-cell-inner\"]>>text=\"'+str(time_curt.day)+'\"') 146 #page.wait_for_timeout(1000)147148 #elif time_curt.month==12 :149 # page.click('li[class=\"zent-datepicker-panel-body-cells_item zent-datepicker-panel-body-cells_available\"]>>div[class=\"zent-datepicker-cell-inner\"]>>text=\"'+str(time_curt.day)+'\"') 150 ##å¦ææ¯æå åå
ç¹å»æ¬æ åç¹å»ä¸æ151 #elif time_curt.month>1 and time_curt.day==1:152 # page.click("text="+str(time_curt.month-1)+"æ")153 # page.wait_for_timeout(1000)154 # page.click("text="+str(time_curt.month)+"æ")155 # page.wait_for_timeout(1000)156 # page.click('li[class=\"zent-datepicker-panel-body-cells_item zent-datepicker-panel-body-cells_available\"]>>div[class=\"zent-datepicker-cell-inner\"]>>text=\"'+str(time_curt.day)+'\"')157 # page.wait_for_timeout(1000)158159160 ##å¦ææ¯ææ« åå
ç¹å»æ¬æ åç¹å»ä¸æ161 #elif is_month_lastday(time_curt):162 # #page.click("text="+str(datetime.date.today().month)+"æ")163 # #page.wait_for_timeout(1000)164 # #page.click("text="+str(time_curt.month)+"æ")165 # #page.wait_for_timeout(1000)166 # page.click('li[class=\"zent-datepicker-panel-body-cells_item zent-datepicker-panel-body-cells_available\"]>>div[class=\"zent-datepicker-cell-inner\"]>>text=\"'+str(time_curt.day)+'\"')167 # page.wait_for_timeout(1000)168169 #else :170 # #ç¨é¾å¼éæ©å¨éåºä¸ææ¥ææ¡çå个æ¥æ171 # #try:172 # # page.click('li[class=\"zent-datepicker-panel-body-cells_item zent-datepicker-panel-body-cells_available\"]>>div[class=\"zent-datepicker-cell-inner\"]>>text=\"'+str(time_curt.day)+'\"')173 # #except Exception as e:174 # # page.click('li[class=\"zent-datepicker-panel-body-cells_item zent-datepicker-panel-body-cells_available zent-datepicker-panel-body-cells_current\"]>>div[class=\"zent-datepicker-cell-inner\"]>>text=\"'+str(time_curt.day)+'\"') 175 try:176 page.click('li[class=\"zent-datepicker-panel-body-cells_item zent-datepicker-panel-body-cells_available\"]>>div[class=\"zent-datepicker-cell-inner\"]>>text=\"'+str(time_curt.day)+'\"')177 except Exception as e:178 page.click('li[class=\"zent-datepicker-panel-body-cells_item zent-datepicker-panel-body-cells_available zent-datepicker-panel-body-cells_current\"]>>div[class=\"zent-datepicker-cell-inner\"]>>text=\"'+str(time_curt.day)+'\"') 179180 page.click("button:has-text(\"ç¡®å®\")")181182 ###################åæ¥ææ¡##########################################################183 page.click("div:nth-child(3) div .zent-datepicker-trigger") #åæ¥ææ¡184 # page.click(".zent-datepicker-trigger") #åæ¥ææ¡185 ##å¦ææ¯å¹´æ« åéè¦å
ç¹å»ä»å¹´,åç¹ä¸å¹´,åç¹1æ,åç¹12æ186 #if time_curt.month==12 and time_curt.day==1:187 #page.click("text="+str(datetime.date.today().year)+"å¹´")188 #page.wait_for_timeout(1000)189 #page.click("text="+str(time_curt.year)+"å¹´")190 #page.wait_for_timeout(1000)191 #page.click("text=1æ")192 #page.wait_for_timeout(1000)193 #page.click("text=12æ")194 #page.wait_for_timeout(1000)195 #page.click('li[class=\"zent-datepicker-panel-body-cells_item zent-datepicker-panel-body-cells_available\"]>>div[class=\"zent-datepicker-cell-inner\"]>>text=\"'+str(time_curt.day)+'\"')196 #page.wait_for_timeout(1000)197 #elif time_curt.month==12 :198 # page.click('div[class=\"zent-datepicker-cell-inner\"]>>text=\"'+str(time_curt.day)+'\"') 199 ##å¦ææ¯æå åå
ç¹å»ä¸æ åç¹å»æ¬æ 200 # elif time_curt.month>1 and time_curt.day==1:201 # page.click("text="+str(time_curt.month-1)+"æ")202 # page.wait_for_timeout(1000)203 # page.click("text="+str(time_curt.month)+"æ")204 # page.wait_for_timeout(1000)205206 ##å¦ææ¯ææ« åå
ç¹å»æ¬æ åç¹å»ä¸æ207 #elif is_month_lastday(time_curt):208 #page.click("text="+str(datetime.date.today().month)+"æ")209 #page.wait_for_timeout(1000)210 #page.click("text="+str(time_curt.month)+"æ")211 #page.wait_for_timeout(1000)212 #page.click('li[class=\"zent-datepicker-panel-body-cells_item zent-datepicker-panel-body-cells_available\"]>>div[class=\"zent-datepicker-cell-inner\"]>>text=\"'+str(time_curt.day)+'\"')213 #page.wait_for_timeout(1000) 214 215 #else :216 #ç¨é¾å¼éæ©å¨éåºä¸ææ¥ææ¡çå个æ¥æ217 #try:218 # page.click('li[class=\"zent-datepicker-panel-body-cells_item zent-datepicker-panel-body-cells_available\"]>>div[class=\"zent-datepicker-cell-inner\"]>>text=\"'+str(time_curt.day)+'\"')219 #except Exception as e:220 # page.click('li[class=\"zent-datepicker-panel-body-cells_item zent-datepicker-panel-body-cells_available zent-datepicker-panel-body-cells_current\"]>>div[class=\"zent-datepicker-cell-inner\"]>>text=\"'+str(time_curt.day)+'\"') 221222 try:223 page.click('li[class=\"zent-datepicker-panel-body-cells_item zent-datepicker-panel-body-cells_available\"]>>div[class=\"zent-datepicker-cell-inner\"]>>text=\"'+str(time_curt.day)+'\"')224 except Exception as e:225 page.click('li[class=\"zent-datepicker-panel-body-cells_item zent-datepicker-panel-body-cells_available zent-datepicker-panel-body-cells_current\"]>>div[class=\"zent-datepicker-cell-inner\"]>>text=\"'+str(time_curt.day)+'\"') 226 page.wait_for_timeout(1000)227 page.click("button:has-text(\"ç¡®å®\")")228229230 # #导åºæ¥è¡¨231 # page.click("button:has-text(\"导åº\")")232 # page.click("button:has-text(\"ç¡®å®å¯¼åº\")")233 # #çå¾
30ç§234 # page.wait_for_timeout(30000)235 236 # with page.expect_popup() as popup_info:237 # page.click("button:has-text(\"æ¥çæ¥è¡¨\")")238 # page1 = popup_info.value239 240 # with page1.expect_download() as download_info:241 # page1.click("button:has-text(\"ä¸è½½è®¢åæ¥è¡¨\")")242 243 # download = download_info.value244 # download.save_as(r'D:\\python\\yz_order_download\\'+time_curt.strftime("%Y%m%d")+'.xlsx') 245 # page1.wait_for_timeout(3000)246 # page1.close()247 # page.goto("https://store.youzan.com/v2/order/query#/")248249 if i==1:250 break251 else:252 try:253 page.goto("https://www.youzan.com/v4/shop/shop-list#/")254 except Exception as e:255 logger.error(e)256 else:257 logger.info('跳转å°åå°é¡µé¢æå') 258259 try:
...
mooc_scraping.py
Source:mooc_scraping.py
...24 for i in range(COURSES_PAGES):25 page_str = "https://www.icourse163.org/home.htm?userId=1469066306&from=study&p=1#/home/course?userId=1395783954&from=study&p=" + \26 str(i+1)27 page.goto(page_str)28 page.wait_for_timeout(1000)29 soup = BeautifulSoup(page.content(), features='lxml')30 course_list = soup.find('div', class_='course-panel-body-wrapper').find_all("div", class_='course-card-wrapper')31 assert course_list != None32 link=None33 for course in course_list:34 box=course.find('div',class_='box')35 course_name=box.find('span',class_='text')36 if(course_name.string==COURSE):37 link = box.find('a', attrs={'data-action': '课ç¨tag-éæ°å¦æ课ç¨'})38 if link!=None:39 break40 if link!=None:41 break 42 43 if link==None:44 print('请确ä¿å·²å å
¥ä¹åç课ç¨')45 exit(1)46 link = 'https://www.icourse163.org/'+link['href']47 assert link!=None48 49 page1=context.new_page()50 page1.goto(link)51 # Click text="æµéªä¸ä½ä¸"52 page1.click("text=æµéªä¸ä½ä¸")53 # page1.wait_for_load_state('load')54 page1.wait_for_timeout(3000)55 for time in range(SCRAP_TIMES):56 page1.wait_for_timeout(3000)57 soup1 = BeautifulSoup(page1.content(), features='lxml')58 units_list = soup1.find_all('div', class_='m-chapterQuizHwItem')59 for unit in units_list:60 # unit_name=unit.h4.string.replace('\\','').replace('/','')61 unit_name=re.sub(pattern,'',unit.h4.string)62 a = unit.find('a', class_='j-quizBtn u-btn u-btn-default f-fr') #æ¾å°è¿ä¸ªåå
对åºçåå¾æµéªæé®63 #ç¹å»"åå¾æµéª"64 page1.click('a[id=\"'+str(a['id'])+'\"]')65 # Click text="å¼å§æµéª"66 page1.wait_for_timeout(1000)67 # page1.wait_for_load_state('load')68 try:69 page1.click("text=\"å¼å§æµéª\"")70 except:71 pass72 # Click text="æ交çæ¡"73 page1.wait_for_timeout(1000)74 page1.click("text=\"æ交çæ¡\"")75 # Click text="ç¡®å®"76 # with page1.expect_navigation(url="https://www.icourse163.org/learn/HUST-481015?tid=1450249446#/learn/quizscore?id=1222237501&aid=2302533181"):77 with page1.expect_navigation():78 page1.click("text=\"ç¡®å®\"")79 80 #å¼å§å¤ç81 page1.wait_for_load_state('load')82 page1.wait_for_timeout(1000)83 soup2 = BeautifulSoup(page1.content(), features='lxml')84 problems = soup2.find_all('div', class_='m-choiceQuestion u-questionItem analysisMode')85 problems.append(soup2.find('div', class_='m-choiceQuestion u-questionItem analysisMode last'))86 problems.append(soup2.find('div',class_='m-choiceQuestion u-questionItem analysisMode first'))87 # assert problems!=None88 res_problems=[]89 for problem in problems:90 res_problem={}91 #æ¾é®é¢çé¢ç®92 # problem_captions=problem.find('p')93 # problem_captions=problem_captions.find_all('span')94 problem_captions=problem.find('div',class_='qaDescription')95 problem_captions=problem_captions.find_all('p')96 res_caption=''97 for problem_caption in problem_captions:98 # for content in problem_caption.contents:99 # res_caption += str(content)100 res_caption+=problem_caption.text101 # res_problem['caption']=res_caption102 res_problem['caption']=''.join(res_caption.split())#å¤çä¸ä¸\xa0çé®é¢103 # res_problem_caption=problem_captions.text104 # # res_problem_caption=''105 # # for problem_caption in problem_captions:106 # # # if problem_caption.string!=None:107 # # # res_problem_caption+=problem_caption.string108 # # # else:109 # # # res_problem_caption+=problem_caption.contents[0]110 # # res_problem_caption+=problem_caption.text111 # # res_problem_caption+=problem_captions.text112 # # print(res_problem_caption)113 # res_problem['caption']=''.join(res_problem_caption.split())#å¤çä¸ä¸\xa0çé®é¢114 #æ¾é®é¢ççæ¡é项115 type=problem.find('div', class_='qaCate j-qacate f-fl')#é¢ç®ç±»å116 type=type.span['class'][0]117 ans_choices=problem.find('span', class_='f-f0 tt2')118 ans_choices=ans_choices.string119 res_answer = ''120 choice_list = problem.find_all('li', class_='f-cb')121 if type=='duo' :#å¤é122 for ans_choice in ans_choices:123 if ord(ans_choice) < ord('A') or ord(ans_choice) > ord('Z'):124 continue # å¤çå¤éçéé¢çé£ä¸ªå¥å·(æ ¼å¼ä¸º"A,B")125 ans_choice = ord(ans_choice)-ord('A')126 answer = choice_list[ans_choice]127 128 answer = answer.find('p')129 for content in answer.contents:130 res_answer += str(content)131 res_answer+=','132 elif type=='dan' :#åé133 ans_choice=ans_choices134 ans_choice = ord(ans_choice)-ord('A')135 answer = choice_list[ans_choice]136 answer = answer.find('p')137 for content in answer.contents:138 res_answer+=str(content)139 elif type=='pan' : #å¤æ140 ans_choice=ans_choices141 ans_choice = ord(ans_choice)-ord('A')142 answer = choice_list[ans_choice].find('span')143 res_answer += answer['class'][0][7:]144 else:145 print(type)146 exit(1)147 res_problem['answer'] = ''.join(res_answer.split())148 #æ¾é®é¢ç解ç149 try:150 res_analysis_info = problem.find('div', class_='analysisInfo answrong').contents[1]151 # res_problem['analysis'] = ''.join(res_analysis_info.contents[1][4:].split())152 res_analysis = ''153 for content in res_analysis_info.contents:154 res_analysis += str(content)155 res_problem['analysis']=res_analysis156 except:157 res_problem['analysis'] = ''158 pass159 # print('problem:')160 # print(problem)161 # print('let show the res_answer')162 # print(res_problem)163 res_problems.append(res_problem)164 # page1.wait_for_timeout(5000)165 # fp.write(json.dumps(res_problems,ensure_ascii=False))166 167 try:168 #æ°è¡¨å°±å¯ä»¥ç´æ¥å169 fp=open('./source/scrap_results/'+course_dir+'/'+unit_name+'.json','x',encoding='utf-8')170 fp.write(json.dumps(res_problems, ensure_ascii=False))171 fp.close()172 except:173 #æ§è¡¨å°±è¦åä¸æ°æ®çå并174 old_table=pd.read_json('./source/scrap_results/'+course_dir+'/'+unit_name+'.json',encoding='utf-8')175 # fp=open('./scrap_results/'+course_dir+'/'+unit_name+'.json','a+',encoding='utf-8')176 # fp=open('./scrap_results/'+course_dir+'/'+unit_name+'.json','w',encoding='utf-8')177 new_table=pd.DataFrame(res_problems)178 new_table=pd.merge(old_table, new_table,how='outer')179 new_table.to_json('./source/scrap_results/'+course_dir+'/'+unit_name+'.json',force_ascii=False,orient='records')180 181 # page1.wait_for_timeout(5000)182 # break183 # continue184 page1.wait_for_timeout(1000)185 page1.click('text=æµéªä¸ä½ä¸')#è¿ååå
å表å¤186 page1.wait_for_timeout(1000)187 # Close page188 page1.close()189 # Close page190 page.close()191 # ---------------------192 context.close()193 browser.close()194with sync_playwright() as playwright:...
apcon.py
Source:apcon.py
...22 topFrame.click('//*[@id="itemTextLink2"]')23 topFrame = page.main_frame.child_frames[2]24 topFrame.click('//*[@id="selectProg"]') 25 topFrame.select_option('select#selectProg', value='ADM001') #é¸åä¸æå¼é¸å®26 page.wait_for_timeout(1000)27 page.screenshot(path=f'/Users/Azure/Desktop/èªååæ¸¬è©¦å ±å/1.系統管çå·¥å
·\ADM001-å端æç¨ç¨å¼ç®¡ç_APC/1-{browser_type.name}.png')28 topFrame.click('//*[@id="UpdateAllowGrp"]')29 page.wait_for_timeout(1000)30 page.screenshot(path=f'/Users/Azure/Desktop/èªååæ¸¬è©¦å ±å/1.系統管çå·¥å
·\ADM001-å端æç¨ç¨å¼ç®¡ç_APC/2-{browser_type.name}.png')31 topFrame.click('//*[@id="Submit"]')32 page.wait_for_timeout(1000)33 page.screenshot(path=f'/Users/Azure/Desktop/èªååæ¸¬è©¦å ±å/1.系統管çå·¥å
·\ADM001-å端æç¨ç¨å¼ç®¡ç_APC/3-{browser_type.name}.png')34 page.wait_for_timeout(1000)35 #-------------------------------------------------------------------------------------------------36 topFrame = page.main_frame.child_frames[1]37 topFrame.click('//*[@id="itemTextLink3"]')38 page.wait_for_timeout(1000)39 page.screenshot(path=f'/Users/Azure/Desktop/èªååæ¸¬è©¦å ±å/1.系統管çå·¥å
·\ADM007-系統æ¥åçæ
æ¥è©¢_APC/1-{browser_type.name}.png')40 topFrame = page.main_frame.child_frames[2]41 topFrame.click('//*[@id="sid"]') 42 topFrame.select_option('select#sid', value='302')43 page.wait_for_timeout(1000)44 page.screenshot(path=f'/Users/Azure/Desktop/èªååæ¸¬è©¦å ±å/1.系統管çå·¥å
·\ADM007-系統æ¥åçæ
æ¥è©¢_APC/2-{browser_type.name}.png')45 topFrame.click('//*[@id="aForm"]/div[2]/input')46 page.wait_for_timeout(1000)47 page.screenshot(path=f'/Users/Azure/Desktop/èªååæ¸¬è©¦å ±å/1.系統管çå·¥å
·\ADM007-系統æ¥åçæ
æ¥è©¢_APC/3-{browser_type.name}.png')48 page.wait_for_timeout(1000)49 #--------------------------------------------------------------------------------------------------------------------------------50 topFrame = page.main_frame.child_frames[1]51 topFrame.click('//*[@id="itemTextLink4"]')52 page.wait_for_timeout(1000)53 page.screenshot(path=f'/Users/Azure/Desktop/èªååæ¸¬è©¦å ±å/1.系統管çå·¥å
·\ADM008-使ç¨è
帳è群çµç®¡ç_APC/1-{browser_type.name}.png')54 topFrame = page.main_frame.child_frames[2]55 topFrame.click('//html/body/center/form/table/tbody/tr/td/fieldset/select') 56 topFrame.select_option('//html/body/center/form/table/tbody/tr/td/fieldset/select', value='1')57 page.wait_for_timeout(1000)58 page.screenshot(path=f'/Users/Azure/Desktop/èªååæ¸¬è©¦å ±å/1.系統管çå·¥å
·\ADM008-使ç¨è
帳è群çµç®¡ç_APC/2-{browser_type.name}.png')59 page.wait_for_timeout(1000)60 topFrame.click('//*[@id="adm"]')61 page.wait_for_timeout(1000)62 page.screenshot(path=f'/Users/Azure/Desktop/èªååæ¸¬è©¦å ±å/1.系統管çå·¥å
·\ADM008-使ç¨è
帳è群çµç®¡ç_APC/3-{browser_type.name}.png')63 topFrame.click('//html/body/center/form/input')64 topFrame.click('//html/body/center/form/table/tbody/tr/td/fieldset/select') 65 topFrame.select_option('//html/body/center/form/table/tbody/tr/td/fieldset/select', value='2')66 page.wait_for_timeout(1000)67 page.screenshot(path=f'/Users/Azure/Desktop/èªååæ¸¬è©¦å ±å/1.系統管çå·¥å
·\ADM008-使ç¨è
帳è群çµç®¡ç_APC/4-{browser_type.name}.png')68 topFrame.click('//html/body/center/form/table/tbody/tr/td/fieldset/select') 69 topFrame.select_option('//html/body/center/form/table/tbody/tr/td/fieldset/select', value='3')70 page.wait_for_timeout(1000)71 page.screenshot(path=f'/Users/Azure/Desktop/èªååæ¸¬è©¦å ±å/1.系統管çå·¥å
·\ADM008-使ç¨è
帳è群çµç®¡ç_APC/5-{browser_type.name}.png')72 topFrame.click('//html/body/center/form/table/tbody/tr/td/fieldset/select') 73 topFrame.select_option('//html/body/center/form/table/tbody/tr/td/fieldset/select', value='4')74 page.wait_for_timeout(1000)75 page.screenshot(path=f'/Users/Azure/Desktop/èªååæ¸¬è©¦å ±å/1.系統管çå·¥å
·\ADM008-使ç¨è
帳è群çµç®¡ç_APC/6-{browser_type.name}.png')76 topFrame.click('//*[@id="CurGrp"]') 77 topFrame.select_option('select#CurGrp', value='0000033333333')78 page.wait_for_timeout(1000)79 topFrame.fill('//*[@id="NewGrpName"]',"åæ³°æ©å¨äºº")80 page.wait_for_timeout(1000)81 page.screenshot(path=f'/Users/Azure/Desktop/èªååæ¸¬è©¦å ±å/1.系統管çå·¥å
·\ADM008-使ç¨è
帳è群çµç®¡ç_APC/7-{browser_type.name}.png')82 topFrame.click('//*[@id="update"]')83 page.wait_for_timeout(1000)84 page.screenshot(path=f'/Users/Azure/Desktop/èªååæ¸¬è©¦å ±å/1.系統管çå·¥å
·\ADM008-使ç¨è
帳è群çµç®¡ç_APC/8-{browser_type.name}.png')85 page.wait_for_timeout(1000)...
LambdaTest’s Playwright tutorial will give you a broader idea about the Playwright automation framework, its unique features, and use cases with examples to exceed your understanding of Playwright testing. This tutorial will give A to Z guidance, from installing the Playwright framework to some best practices and advanced concepts.
Get 100 minutes of automation test minutes FREE!!