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
0
votes
0 answers

Running UI test: playwright async/await doesn't work

I'm using playwright to run a UI test. This test request to get a URL, login, and then check the page content. As a start I just tried to login and capture the import keyring import asyncio from playwright.async_api import async_playwright,Page,…
Ginger_Chacha
  • 317
  • 1
  • 11
0
votes
1 answer

React locator example

I am trying to understand how the react selectors are working according to https://playwright.dev/docs/selectors#react-selectors . So I am trying some things in playwright sandbox. Seems that the react component cannot be found. from…
pikk
  • 837
  • 5
  • 21
  • 38
0
votes
1 answer

playwright waiting leads an error because of not responding click event

I wrote a code as sample below in playwright; when run a code , its failed 2:10 ratio. Click event not happened and leads an error. click event changed to page.click('text=Place Order') or page.click('div[title="Place Order"]'] may i know any…
user16526082
0
votes
1 answer

How to get outer html from python playwright locator object?

I could not find any method that returns outer html from python playwright page.locator(selector, **kwargs). Am I missing something? locator.inner_html(**kwargs) do exists. However, I am trying to use pandas.read_html and it fails on table locator…
Rahul
  • 10,830
  • 4
  • 53
  • 88
0
votes
0 answers

Not able to use input or buttons in SAP web app with Playwright

I am creating a test for an SAP web app with Playwright. I am having trouble to have it click on buttons or use the inputs of the selected IDs with Playwright. It selects (highlights) the buttons and input fields correctly, but then nothing…
0
votes
1 answer

Playwright Python POST request

I am using the following code in order to retrieve a json from an endpoint: import json from playwright.sync_api import sync_playwright API_URL = 'url' with sync_playwright() as p: browser = p.webkit.launch(headless=True) page =…
SctALE
  • 509
  • 2
  • 10
  • 30
0
votes
2 answers

scrapy going through first link only

I am new to scrapy and python in general and i am trying to make a scraper that extracts links from a page then edit these links then go through each one of them .. I am using playwright with scrapy. this is where i am at but for some reason it only…
nas22663
  • 1
  • 1
0
votes
1 answer

How to click the dropdown option which is visible only by hovering action using playwrite python script

Playwright python script for action: click "To CSV" is dropdown visible only by hovering over the text "Export": HTML:
Megan
  • 29
  • 3
0
votes
0 answers

Links won't follow properly to get parsed

I can't seem to get my scraper to follow the links to def parse_jobs, I only get a single result and it won't interate for each href that I've grabbed. I get a lot of output that isn't meaningful, and whilst I get a 200 I don't actually get much…
joe_bill.dollar
  • 374
  • 1
  • 9
0
votes
1 answer

Integrating Playwright with Scrapy scrapes only a single item

I'm practicing the integration of Playwright and Scrapy, however, my scraper would only return a single item. I'm not sure whether I have my xpath wrong? because I get the following output: 2022-01-04 21:41:24 [scrapy.core.scraper] DEBUG: Scraped…
me.limes
  • 441
  • 1
  • 13
0
votes
1 answer

Helium's API : Selection List options not able to select

Learning Helium for automation; I could not able to select List options either using Click or Hover and Click. Is it any solutions? for an example; https://bigcrewnow.in/product/iphone-5s-32gb/ - in the page have an Colors option and would be select…
user16526082
0
votes
1 answer

how do I open a link in a new tab using playwright?

I need to collect all the links from the page, open each one (alternately) in a new tab, collect data from the page and close the tab. in selenium, I would do something similar to this: elems = driver.find_elements_by_xpath("//a[@href]") main_window…
r_motion
  • 23
  • 6
0
votes
1 answer

Scrape text with playwright is slow on part of the code (using page.locator)

I have made a script in playwright, to scrape some text. This is the part i have problems, here i scrape a series name, using locator: # Series global nfo_series try: nfo_series = page.locator("#Series > span:nth-child(1)") nfo_series =…
Rose
  • 65
  • 1
  • 1
  • 7
0
votes
2 answers

I created a cookies.json file with and used playwright to add cookies to the browser context, but it was always wrong

I created a request using python's requests and saved the cookie of the request response to cookies.json, and used playwright to add cookies to the browser context, but it was always wrong. playwright._impl._api_types. Error: cookies: expected…