Questions tagged [playwright-java]
For questions about the Playwright API for Java. This tag should be used in conjunction with the [playwright] tag.
playwright-java
111
questions
0
votes
0
answers
65
views
waitForUrl behaviour in Playwright
I am using page.waitForUrl method to wait for desired url. After clicking the submit button, I am trying to wait for url using
page.waitForURL("/my-test-url/v1/foo/") but getting time out ...
0
votes
1
answer
84
views
Playwright - type or fill not working as expected
I am automating UI using PlayWright and Java. I have a search box in the iFrame. When I enter the text in it, I get the tool tip: Search for <number_entered> by. However, when I enter the number ...
0
votes
1
answer
47
views
How to handle multiple tabs using Playwright Java & POM and interact with elements inside the new tab
How to handle multiple tabs using Playwright Java & POM and interact with elements inside the new tab?
I am using PageBase class and here is the basic content of it
public class PageBase {
...
0
votes
0
answers
56
views
Chromium distribution 'chrome' is not found at /opt/google/chrome/chrome
Im trying to install chromium and run the test cases using the bitbucket pipeline
The below is my pipeline
image: mcr.microsoft.com/playwright/java:v1.33.0-focal
pipelines:
default:
- step:
...
0
votes
1
answer
44
views
Duplicate image being generated with default name like embedded1.png when using scenario.attach() in cucumber java
I am new to Playwright and cucumber. I have setup a simple project where I am taking a screenshot of the Home Page when login is successful on a website. Screenshot is getting generated in ...
0
votes
0
answers
42
views
Issue while running multiple tests with Playwright Java and Cucumber
I'm trying to execute multiple tests using Playwright Java and Cucumber, but only one scenario executes successfully, others fails as couldn't find elements on Page.
Below the code of 2 classes: ...
0
votes
0
answers
12
views
Can I run Playwright Junit5 Gradle Tests on Sauce Lab Real Devices Chomre or Safari Browsers
I do have a Test Automation Framework. Playwright Java (Junit5 Gradle).
I am wondering if I can run my web tests on Saucelab real devices Chrome or Safari browsers.
I have used sauce_bindings but ...
0
votes
0
answers
14
views
Locator on table, how to get full html?
I got locators to tables from a frame.
Have two tables.
List<Locator> tables = f.locator("table").all();
for (Locator l: tables){
.....
String r = l.getAttribute("id") + ...
0
votes
0
answers
60
views
How do I know a Locator really points to an existing element?
I am using #playwright-java , learning by doing, first time user.
I have been attracted by the ease of use seen in the demos.
However, when facing a complex website it turns out it needs more trial&...
0
votes
0
answers
38
views
Login error despite giving the correct credentials with playwright. and this only happens with one specific website
So im trying to log in to a website to further automate it... but the problem is despite me providing the correct username and password the page throws and error when i perform sign in. Yes i have ...
0
votes
0
answers
22
views
I used page.waitForNavigation to wait still the page is load but its not working
Here is my code:
page.waitForNavigation();
// Get the page title after login-
String pageTitleAfterLogin = page.title();
Thread.sleep(5000);
// Print the page title after login
System.out....
0
votes
0
answers
16
views
It is strongly recommended to add TestNG may fail or not work as expected
[TestNGContentHandler] [WARN] It is strongly recommended to add "" at the top of your file, otherwise TestNG may fail or not work as expected.
Please help me
[TestNGContentHandler] [WARN] It ...
0
votes
0
answers
68
views
Playwright tests are failing on WebKit browser
I recently upgraded to Mac M3 Pro and it has MacOS Sonoma, I see all the WebKit browser Tests are failing with this error
com.microsoft.playwright.PlaywrightException: Error { message='Protocol error (...
0
votes
2
answers
76
views
Playwright automation exception - Page.LocatorOptions().setHasText() giving 2 elements. How to identify uniquely
I am trying to select a value from an Angular dropdown using Playwright-Java. It is failing due to multiple values found. How to uniquely identify by text.
getPage().locator(obj).click();
...
1
vote
0
answers
290
views
How to disable Automation Controlled for firefox in java Playwright
I am making an automation with playwright in Java. You will log in to accounts by going to an e-commerce site. A process repeated many times.
With Chromium, by setting the --disable-blink-features=...