Questions tagged [playwright-python]

Microsoft Playwright is a web automation library comparable to Selenium. This tag refers to the Python port of the library.

Microsoft Playwright is a web automation library comparable to Selenium. Originally a Javascript project, this is now also available in Python.

Related tags:

365 questions
-1
votes
1 answer

Playwright not locating non-english characters text

I am trying to click at a href tag text, in this case "São Vicente":
  • São Vicente 139
  • Using the code: zone = "São Vicente" try: tiredAF =…
    -1
    votes
    2 answers

    How to get text within a span tag with playwright?

    I skimmed through similar questions, but all questions seem to be focused around 'locating span tag by text', but my goal is to 'get all texts within span tag'. ex) from playwright.sync_api import sync_playwright browser =…
    -1
    votes
    1 answer

    Can I press a button after another button using Playwright Python webscraping?

    I'm trying to write a code that will go onto this website "https://racing.hkjc.com/racing/information/English/racing/RaceCard.aspx?RaceDate=2023/04/06&Racecourse=HV&RaceNo=1"and click on the horse named "lucky missile". It should get led to a popup…
    -1
    votes
    1 answer

    How to make Playwright not to raise exceptions when the browser is closed

    I have a interface which has a button that closes the playwright context and browser, but when i close it, a lot of exceptions (because the playwright browser and context were closed during some actions) are raised and i couldn't ignore them with…
    -1
    votes
    1 answer

    playwright doesn't respond with systemctl service

    My server is running on Ubuntu 22.04.1 LTS and I have a python flask app which runs perfectly with an active virtual environment (source bin/activate) using wsgi [python 3.10]. While all my other routes are working fine, I can't make playwright…
    -1
    votes
    1 answer

    playwright is timing out before running page.pause()

    everything was running fine the code opened a website and carried out some functions i took a 60 min break and now playwright refuses to do even the most basic function it loads the website and times out i wrote a new code to test what was wrong…
    noob
    • 33
    • 6
    -1
    votes
    1 answer

    Installating Playwright on Visual Studio Code with Python

    I wanted to learn Playwright and I know Python so I wanted to install it on Visual Studio Code. I was following up this youtube tutorial "https://www.youtube.com/watch?v=H2-5ecFwHHQ" and the lecturer saied at 19 sec in this video to put code on…
    -1
    votes
    1 answer

    playwright python how to get specific texts follwing sibling inner text value

    I am trying to get the next sibling and next siblings that are in row using the text that occurring in the DOM. but i can't get it by using text that are in DOM Here i have the selected row's text content, by using the text content i don't know how…
    Mohanraj
    • 79
    • 9
    -1
    votes
    3 answers

    Playwright Java : Playwright fails to click on element whose property is set hidden

    I tried many locators but looks like its hidden so playwright fails to click any workaround please help
    -1
    votes
    2 answers

    Scrapy Playwright: execute CrawlSpider using scrapy playwright

    Is it possible to execute CrawlSpider using Playwright integration for Scrapy? I am trying the following script to execute a CrawlSpider but it does not scrape anything. It also does not show any error! import scrapy from scrapy.linkextractors…
    Raisul Islam
    • 277
    • 2
    • 19
    -1
    votes
    1 answer

    Playwright - Bypassing Fido2 u2f

    I'm using Playwright to automate things on a website that I am using Fido2 u2f. I can't run it in headless mode as I need to be ready to touch my u2f when it's prompted. This is very annoying. Is there a way to accept the u2f without me having to…
    horse
    • 479
    • 7
    • 25
    -2
    votes
    0 answers

    Click on an element inside an iframe on playwright?

    I carry out tests for the site https://vin-history.org , the site runs on Cloudflare, how to automatically click the "I am a person" button page.frame_locator('#cf-chl-widget-h4ceo').locator('html').click() I tried this construction, but it…
    -2
    votes
    1 answer

    how to fill text box using playwright module if input type="hidden"

    i am trying to fill the title text box i used page.locator('input[name="fname").fill("XYZ") but getting error. waiting for selector tried: i tried multiple ways like xpath, title, name, etc. I am not getting a proper idea: actual HTML is: enter…
    -2
    votes
    1 answer

    Can Playwright on Python run the Tor browser?

    I'd like to automate the Tor Browser using Playwright on Python. My question is "What code in the Playwright API runs a different browser than the default web drivers?" overall but more specifically "What is the code to get Playwright to run the Tor…
    Al Sweigart
    • 11,566
    • 10
    • 64
    • 92
    -2
    votes
    2 answers

    Playwright: click on element within one/multiple elements using Python

    My goal is to web scrape a dynamic web page's HTML using Playwright for Python. Within an ordered list, there are multiple list items, and each contains multiple spans, of which one span has a button / link. Once there is a click on the button, it…
    1 2 3
    24
    25