Closed Mezohren closed 1 year ago
@allcontributors please add @Mezohren for bugs
@aaltat
I've put up a pull request to add @Mezohren! :tada:
I tried to reproduce the error but could not make it happen. I created this
<ul class="align">
<li class="detail-tab1 other-1">
<a herf="#tab1">
<span id="prefix:other1">other1</span>
</a>
</li>
<li class="detail-tab3 other-3">
<a herf="#tab3">
<span id="prefix:other3">other3</span>
</a>
</li>
<li class="detail-tab2 other-2">
<a herf="#tab2">
<span id="prefix:other2">other2</span>
</a>
</li>
</ul>
On static html file. Then I used this in test: Get Classes li:has([id="prefix:other3"])
but the keyword does not fail. Also tried with assertion operator, but does not fail in that case either. Get Classes li:has([id="prefix:other3"]) == detail-tab3 other-3
I guess there is something else triggering the error. Would you have more details to share, are you using assertion operator, or something else which might be relevant? Can you enable enable_playwright_debug
from library import and show us the the relevant parts from the debug logs. My, successful case looks like:
{"level":30,"time":"2023-05-30T18:59:42.870Z","pid":63038,"hostname":"Tatu","msg":"Start of node method getDomProperty"}
{"level":30,"time":"2023-05-30T18:59:42.870Z","pid":63038,"hostname":"Tatu","msg":"Strict mode is enabled, find Locator with li:has([id=\"prefix:other3\"]) in page."}
2023-05-30T18:59:42.870Z pw:api => locator.elementHandle started
2023-05-30T18:59:42.870Z pw:api waiting for locator('li:has([id="prefix:other3"])')
2023-05-30T18:59:42.871Z pw:api "domcontentloaded" event fired
2023-05-30T18:59:42.877Z pw:api locator resolved to visible <li class="detail-tab3 other-3">…</li>
2023-05-30T18:59:42.879Z pw:api <= locator.elementHandle succeeded
2023-05-30T18:59:42.879Z pw:api => elementHandle.getProperty started
2023-05-30T18:59:42.882Z pw:api <= elementHandle.getProperty succeeded
2023-05-30T18:59:42.883Z pw:api => jsHandle.jsonValue started
2023-05-30T18:59:42.883Z pw:api <= jsHandle.jsonValue succeeded
{"level":30,"time":"2023-05-30T18:59:42.883Z","pid":63038,"hostname":"Tatu","msg":"Retrieved dom property for element li:has([id=\"prefix:other3\"]) containing [object Object]"}
{"level":30,"time":"2023-05-30T18:59:42.883Z","pid":63038,"hostname":"Tatu","msg":"End of node method getDomProperty"}
Yours can look different, but start of the logging should be similar, but selector is unique for you.
Hi,
the 'enable_playwirhgt_debug" argument is deprecated. And when I use it my browser keywords are note recognized
The enable_playwright_debug
is not deprecated, it is not anymore positional argument. I have no idea why you IDE stops working, but that is separate issue. Just add the argument in the import and run the test.
@Mezohren
can you give us any reproducible sequence?
otherwise i would close this issue.
Closing, if you r problem persist, please comment and we will consider reopening the issue.
When running the
Get classes
keyword I am getting the following errorTypeError: Cannot convert object to primitive value
This is what my code looks like.
Browser.Get Classes li:has([id="tabbeddata:${TabItem}Label"])
On this dom element (where leefsituatie = ${TabItem})
This is the full stack trace I'm getting
Using the following versions: