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 using PlayWright’s .fill() or .type() the UI does not identify the text entered and displays message: Search for “” by (refer below screenshot) implying that the UI thinks no text is entered.
When I enter the same text manually it just works fine. The UI identfies the text entered.
Code:
Page page = browser.newPage();
FrameLocator frame = page.frameLocator("#iFrameID");
Locator searchBox = frame.locator("#searchBox");
searchBox.click();
searchBox.fill ("454545487");
Locator searchIcon = frame.locator(".searchContainer");
searchIcon.click()