You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been working on an automation project using Playwright JavaScript with the Cucumber framework. I've encountered an issue where I am unable to proceed with the "fill" action in the Firefox browser, while the same script runs correctly in Chrome and Edge browsers.
I have given the code and screenshot of the field in which I am facing an issue. I have also attached the XPath for the first input field “Min. QTM.
The fill action should work fine just like it works for the other two browsers(Chrome and edge)
Actual behavior
The fill action is not working in Firefox browser.
The error massage is displayed in the console as:
Test timeout of 160000ms exceeded.
Error: locator.fill: Test timeout of 160000ms exceeded.
Call log:
- waiting for locator('//input[@formcontrolname=\'min_quantum\']')
- locator resolved to <input type="text" _ngcontent-ng-c2430308819="" formcon…/>
- elementHandle.fill("99999")
- waiting for element to be visible, enabled and editable
- element is visible, enabled and editable
- locator resolved to <input type="text" _ngcontent-ng-c2430308819="" formcon…/>
- elementHandle.fill("99999")
401 | if (await this.page.isVisible("//input[@formcontrolname='min_quantum']")) {
JavaScript query selector
await pageFixture.page.evaluate((minQuantumValue1) => {
document.querySelector('input[placeholder*=Min]').value = minQuantumValue1;
}, minQuantumValue1);
In this approach, I faced another issue as I was able to fill the ‘Quantum’ field but after that ‘Place Response’ button is disabled.
. Playwright Action (Fill) and JavaScript query selector
Tried filling the ‘Min. QTM ‘field in playwright, then cleared that field and again filled the same field using JavaScript Query selector
await pageFixture.page.locator("//input[@formcontrolname='min_quantum']").fill(minQuantumValue1);
await pageFixture.page.locator("//input[@formcontrolname='min_quantum']").fill('');
await pageFixture.page.evaluate((minQuantumValue1) => {
document.querySelector('input[placeholder*=Min]').value = minQuantumValue1;
}, minQuantumValue1);
On trying this, I got timeout error message
5.Javascript Query selector
Tried filled the ‘Min. QTM’ field in JavaScript Query selector and cleared the same field in JavaScript Query selector and again filled the ‘Min. QTM’ field using the JavaScript Query selector
await pageFixture.page.evaluate((minQuantumValue1) => {
document.querySelector('input[placeholder*=Min]').value = minQuantumValue1;
document.querySelector('input[placeholder*=Min]').value = " ";
document.querySelector('input[placeholder*=Min]').value = minQuantumValue1;
}, minQuantumValue1);
In this approach, I faced another issue as I was able to fill the ‘Min. QTM’ field but after that ‘Place Response’ button is disabled.
Here I am faced another issue. I was able to fill the field but after that the place response button is disabled.
pressSequentially
await this.page.locator("//input[@formcontrolname='min_quantum']").pressSequentially(minQuantumValue1);
On trying this approach, error message is displayein the console as:
Test timeout of 160000ms exceeded.
Error: locator.pressSequentially: Test timeout of 160000ms exceeded.
Call log:
waiting for locator('//input[@formcontrolname='min_quantum']')
at ..\pages\DashboardCFP.js:412
Version
1.41.2
Steps to reproduce
I have been working on an automation project using Playwright JavaScript with the Cucumber framework. I've encountered an issue where I am unable to proceed with the "fill" action in the Firefox browser, while the same script runs correctly in Chrome and Edge browsers.
I have given the code and screenshot of the field in which I am facing an issue. I have also attached the XPath for the first input field “Min. QTM.
pageFixture.page.locator("//input[@formcontrolname='min_quantum']").fill(minQuantumValue1);
![Screenshot 2024-02-22 181242](https://private-user-images.githubusercontent.com/144116358/306998283-2e27058c-c63f-4a0f-8c03-f2b2058819f0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMyMDMzODAsIm5iZiI6MTcyMzIwMzA4MCwicGF0aCI6Ii8xNDQxMTYzNTgvMzA2OTk4MjgzLTJlMjcwNThjLWM2M2YtNGEwZi04YzAzLWYyYjIwNTg4MTlmMC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODA5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgwOVQxMTMxMjBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iYzdjYWVhM2FiYmY2NmIzYzRiNzI4MTY0MzJiMTQ5NzA1ZmVlYTY1NmM4NjJjYjM1ZmVlMDA2ZjQxNTMzMzQyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.SAoNUjAsjy60_xeIPJq6Fm9zRfqnxhi-nlyGEYxuvAE)
Input tag(Xpath)
Expected behavior
The fill action should work fine just like it works for the other two browsers(Chrome and edge)
Actual behavior
The fill action is not working in Firefox browser.
The error massage is displayed in the console as:
Test timeout of 160000ms exceeded.
401 | if (await this.page.isVisible("//input[@formcontrolname='min_quantum']")) {
Additional context
Workarounds I tried:
Setting timeout for particular field
await this.page.locator("//input[@formcontrolname='min_quantum']").fill(minQuantumValue1,{timeout:90000});
Playwright Action (Fill and type )
I tried filling the ‘Min. QTM’ field and clearing the field and typing the field doesn’t work.
await pageFixture.page.locator("//input[@formcontrolname='min_quantum']").fill(minQuantumValue1);
await pageFixture.page.locator("//input[@formcontrolname='min_quantum']").fill('');
await pageFixture.page.locator("//input[@formcontrolname='min_quantum']").type(minQuantumValue1);
JavaScript query selector
await pageFixture.page.evaluate((minQuantumValue1) => {
document.querySelector('input[placeholder*=Min]').value = minQuantumValue1;
}, minQuantumValue1);
In this approach, I faced another issue as I was able to fill the ‘Quantum’ field but after that ‘Place Response’ button is disabled.
. Playwright Action (Fill) and JavaScript query selector
Tried filling the ‘Min. QTM ‘field in playwright, then cleared that field and again filled the same field using JavaScript Query selector
await pageFixture.page.locator("//input[@formcontrolname='min_quantum']").fill(minQuantumValue1);
await pageFixture.page.locator("//input[@formcontrolname='min_quantum']").fill('');
await pageFixture.page.evaluate((minQuantumValue1) => {
document.querySelector('input[placeholder*=Min]').value = minQuantumValue1;
}, minQuantumValue1);
On trying this, I got timeout error message
5.Javascript Query selector
Tried filled the ‘Min. QTM’ field in JavaScript Query selector and cleared the same field in JavaScript Query selector and again filled the ‘Min. QTM’ field using the JavaScript Query selector
await pageFixture.page.evaluate((minQuantumValue1) => {
document.querySelector('input[placeholder*=Min]').value = minQuantumValue1;
document.querySelector('input[placeholder*=Min]').value = " ";
document.querySelector('input[placeholder*=Min]').value = minQuantumValue1;
}, minQuantumValue1);
In this approach, I faced another issue as I was able to fill the ‘Min. QTM’ field but after that ‘Place Response’ button is disabled.
6.Try catch method
try {
console.log("Trying...");
await pageFixture.page.locator("//input[@formcontrolname='min_quantum']").fill(minQuantumValue1);
await pageFixture.page.locator("//input[@formcontrolname='min_quantum']").fill('');
await pageFixture.page.locator("//input[@formcontrolname='min_quantum']").type(minQuantumValue1);
Here I am faced another issue. I was able to fill the field but after that the place response button is disabled.
pressSequentially
await this.page.locator("//input[@formcontrolname='min_quantum']").pressSequentially(minQuantumValue1);
On trying this approach, error message is displayein the console as:
Test timeout of 160000ms exceeded.
Error: locator.pressSequentially: Test timeout of 160000ms exceeded.
Call log:
at ..\pages\DashboardCFP.js:412
Environment
The text was updated successfully, but these errors were encountered: