这是该对象的 html:
<div class="filter-component filter-component-1">
<p class="usa-accordion__heading">
<button aria-selected="false" class="filtered assignment usa-accordion__button filter-dropdown ds-c-button ds-u-padding-left--1 ds-u-padding-right--4 ds-u-padding-y--1" aria-expanded="false" aria-controls="a1">
<span>Medicare-approved payment: Full Payment </span>
<div class="filter-arrow down"></div>
</button>
</p>
</div>
Run Code Online (Sandbox Code Playgroud)
我的目标是获取类中的 divfilter-component-1并将其存储在变量中
1 单击该 div 2 单击该 div 中的按钮
我觉得我需要做类似的事情
A NOTE: I have altered how we structure these tests so that they run in aws lambda. The normal sytax of test('test description') etc does not work here. Hence the awaits. Please just focus on the playwright syntax …