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 would like to find a nested element and map it to an object
Actual behavior
Error {
message='Unsupported token "@class" while parsing selector ".div[@class='ml-4']/div[1]"
name='Error
stack='Error: Unsupported token "@class" while parsing selector ".div[@class='ml-4']/div[1]"
at parseCSS (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/utils/isomorphic/cssParser.js:64:31)
at parseSelector (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/utils/isomorphic/selectorParser.js:50:49)
at splitSelectorByFrame (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/utils/isomorphic/selectorParser.js:99:20)
at FrameSelectors.resolveFrameForSelector (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/frameSelectors.js:110:66)
at FrameSelectors.resolveInjectedForSelector (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/frameSelectors.js:152:33)
at /private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/frames.js:1482:47
at Frame.retryWithProgressAndTimeouts (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/frames.js:935:30)
at /private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/frames.js:1481:28
at ProgressController.run (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/progress.js:78:23)
at Frame._callOnElementOnceMatches (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/frames.js:1479:23)
}
Call log:
- - waiting for //*[@id='tbody']/tr >> nth=0 >> .div[@class='ml-4']/div[1]
com.microsoft.playwright.PlaywrightException: Error {
message='Unsupported token "@class" while parsing selector ".div[@class='ml-4']/div[1]"
name='Error
stack='Error: Unsupported token "@class" while parsing selector ".div[@class='ml-4']/div[1]"
at parseCSS (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/utils/isomorphic/cssParser.js:64:31)
at parseSelector (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/utils/isomorphic/selectorParser.js:50:49)
at splitSelectorByFrame (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/utils/isomorphic/selectorParser.js:99:20)
at FrameSelectors.resolveFrameForSelector (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/frameSelectors.js:110:66)
at FrameSelectors.resolveInjectedForSelector (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/frameSelectors.js:152:33)
at /private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/frames.js:1482:47
at Frame.retryWithProgressAndTimeouts (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/frames.js:935:30)
at /private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/frames.js:1481:28
at ProgressController.run (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/progress.js:78:23)
at Frame._callOnElementOnceMatches (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/frames.js:1479:23)
}
Call log:
- - waiting for //*[@id='tbody']/tr >> nth=0 >> .div[@class='ml-4']/div[1]
at com.microsoft.playwright.impl.WaitableResult.get(WaitableResult.java:56)
at com.microsoft.playwright.impl.ChannelOwner.runUntil(ChannelOwner.java:132)
at com.microsoft.playwright.impl.Connection.sendMessage(Connection.java:130)
at com.microsoft.playwright.impl.ChannelOwner.sendMessage(ChannelOwner.java:118)
at com.microsoft.playwright.impl.FrameImpl.innerTextImpl(FrameImpl.java:526)
at com.microsoft.playwright.impl.FrameImpl.lambda$innerText$22(FrameImpl.java:517)
at com.microsoft.playwright.impl.LoggingSupport.withLogging(LoggingSupport.java:47)
at com.microsoft.playwright.impl.ChannelOwner.withLogging(ChannelOwner.java:97)
at com.microsoft.playwright.impl.FrameImpl.innerText(FrameImpl.java:517)
at com.microsoft.playwright.impl.LocatorImpl.innerText(LocatorImpl.java:375)
at com.microsoft.playwright.Locator.innerText(Locator.java:3845)
at pages.DynamicTablePage.getSuperheroes(DynamicTablePage.kt:18)
at DynamicTableTest.checkSpiderMan(DynamicTableTest.kt:12)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
Caused by: com.microsoft.playwright.impl.DriverException: Error {
message='Unsupported token "@class" while parsing selector ".div[@class='ml-4']/div[1]"
name='Error
stack='Error: Unsupported token "@class" while parsing selector ".div[@class='ml-4']/div[1]"
at parseCSS (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/utils/isomorphic/cssParser.js:64:31)
at parseSelector (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/utils/isomorphic/selectorParser.js:50:49)
at splitSelectorByFrame (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/utils/isomorphic/selectorParser.js:99:20)
at FrameSelectors.resolveFrameForSelector (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/frameSelectors.js:110:66)
at FrameSelectors.resolveInjectedForSelector (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/frameSelectors.js:152:33)
at /private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/frames.js:1482:47
at Frame.retryWithProgressAndTimeouts (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/frames.js:935:30)
at /private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/frames.js:1481:28
at ProgressController.run (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/progress.js:78:23)
at Frame._callOnElementOnceMatches (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/frames.js:1479:23)
}
Call log:
- - waiting for //*[@id='tbody']/tr >> nth=0 >> .div[@class='ml-4']/div[1]
at com.microsoft.playwright.impl.Connection.dispatch(Connection.java:259)
at com.microsoft.playwright.impl.Connection.processOneMessage(Connection.java:211)
at com.microsoft.playwright.impl.ChannelOwner.runUntil(ChannelOwner.java:130)
... 14 more
Error {
message='Unsupported token "@class" while parsing selector ".div[@class='ml-4']/div[1]"
name='Error
stack='Error: Unsupported token "@class" while parsing selector ".div[@class='ml-4']/div[1]"
at parseCSS (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/utils/isomorphic/cssParser.js:64:31)
at parseSelector (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/utils/isomorphic/selectorParser.js:50:49)
at splitSelectorByFrame (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/utils/isomorphic/selectorParser.js:99:20)
at FrameSelectors.resolveFrameForSelector (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/frameSelectors.js:110:66)
at FrameSelectors.resolveInjectedForSelector (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/frameSelectors.js:152:33)
at /private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/frames.js:1482:47
at Frame.retryWithProgressAndTimeouts (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/frames.js:935:30)
at /private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/frames.js:1481:28
at ProgressController.run (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/progress.js:78:23)
at Frame._callOnElementOnceMatches (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/frames.js:1479:23)
}
Call log:
- - waiting for //*[@id='tbody']/tr >> nth=0 >> .div[@class='ml-4']/div[1]
com.microsoft.playwright.impl.DriverException: Error {
message='Unsupported token "@class" while parsing selector ".div[@class='ml-4']/div[1]"
name='Error
stack='Error: Unsupported token "@class" while parsing selector ".div[@class='ml-4']/div[1]"
at parseCSS (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/utils/isomorphic/cssParser.js:64:31)
at parseSelector (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/utils/isomorphic/selectorParser.js:50:49)
at splitSelectorByFrame (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/utils/isomorphic/selectorParser.js:99:20)
at FrameSelectors.resolveFrameForSelector (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/frameSelectors.js:110:66)
at FrameSelectors.resolveInjectedForSelector (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/frameSelectors.js:152:33)
at /private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/frames.js:1482:47
at Frame.retryWithProgressAndTimeouts (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/frames.js:935:30)
at /private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/frames.js:1481:28
at ProgressController.run (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/progress.js:78:23)
at Frame._callOnElementOnceMatches (/private/var/folders/fz/dqd2bcr91zj7y1m8p328cpmh0000gn/T/playwright-java-5802737314774923952/package/lib/server/frames.js:1479:23)
}
Call log:
- - waiting for //*[@id='tbody']/tr >> nth=0 >> .div[@class='ml-4']/div[1]
at app//com.microsoft.playwright.impl.Connection.dispatch(Connection.java:259)
at app//com.microsoft.playwright.impl.Connection.processOneMessage(Connection.java:211)
at app//com.microsoft.playwright.impl.ChannelOwner.runUntil(ChannelOwner.java:130)
at app//com.microsoft.playwright.impl.Connection.sendMessage(Connection.java:130)
at app//com.microsoft.playwright.impl.ChannelOwner.sendMessage(ChannelOwner.java:118)
at app//com.microsoft.playwright.impl.FrameImpl.innerTextImpl(FrameImpl.java:526)
at app//com.microsoft.playwright.impl.FrameImpl.lambda$innerText$22(FrameImpl.java:517)
at app//com.microsoft.playwright.impl.LoggingSupport.withLogging(LoggingSupport.java:47)
at app//com.microsoft.playwright.impl.ChannelOwner.withLogging(ChannelOwner.java:97)
at app//com.microsoft.playwright.impl.FrameImpl.innerText(FrameImpl.java:517)
at app//com.microsoft.playwright.impl.LocatorImpl.innerText(LocatorImpl.java:375)
at app//com.microsoft.playwright.Locator.innerText(Locator.java:3845)
at app//pages.DynamicTablePage.getSuperheroes(DynamicTablePage.kt:18)
at app//DynamicTableTest.checkSpiderMan(DynamicTableTest.kt:12)
at [email protected]/java.lang.reflect.Method.invoke(Method.java:566)
at [email protected]/java.util.ArrayList.forEach(ArrayList.java:1541)
at [email protected]/java.util.ArrayList.forEach(ArrayList.java:1541)
Additional context
How can I do that?
This approach is essential in automation testing especially if you work with marketplaces or something that reuses the same component.
Version
1.49.0
Steps to reproduce
Expected behavior
I would like to find a nested element and map it to an object
Actual behavior
Additional context
How can I do that?
This approach is essential in automation testing especially if you work with marketplaces or something that reuses the same component.
Environment
The text was updated successfully, but these errors were encountered: