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
Custom Markup <dc-combobox data-dc-name="NewQuoteInput.ProductSelect" class="field is-required ng-untouched ng-pristine ng-invalid" required=""> <dc-label class="label dc-label"> <label class="label--text" for="cb_3" title="Product:">Product:</label> </dc-label> <div class="control-container"> <div class="control"> <div class="combobox"> <input autocomplete="off" type="text" id="cb_3" placeholder="" fieldref="NewQuoteInput.ProductSelect" class="ng-untouched ng-pristine ng-valid"> <button aria-label="expand" tabindex="-1" class="button" data-toggle="NewQuoteInput.ProductSelect"> <i aria-hidden="true" class="icon-caret-down"/> </button> <div class="drop-panel is-hidden has-alignment-left has-position-bottom"> <nav tabindex="-1" class="navigation" id="cb_3_options"> <a tabindex="-1" class="nav-link">DCT Sample Product (3.0.0.0)</a> </nav> </div> </div> </div> <p class="alert-message" id="cb_3_err">Required</p> <p class="alert-message" id="cb_3_err">Value selected is not a valid option</p> </div> </dc-combobox>
I am unable to select "DCT Sample Product (3.0.0.0)" from div>nav>a and click it programmatically. The way I could do it manually
` productinput := page.Locator("input[fieldref='NewQuoteInput.ProductSelect']")
productbtn := page.Locator("button[data-toggle='NewQuoteInput.ProductSelect']").Click() //This clicks & shows dropdown
productdropdown := page.Locator("div.drop-panel>nav>a").Filter(playwright.LocatorFilterOptions{HasText: "DCT Sample Product (3.0.0.0)"})
log.Println(productdropdown.AllInnerTexts())//Tried this to verify if element exists and it does work
//productinput.Fill("DCT Sample Product (3.0.0.0)") does not work`
I Even followed playwright codegen rewrite that in golang.It didn't work
page.Locator("div").Filter((playwright.LocatorFilterOptions{HasText: "DCT Sample Product (3.0.0.0)"})).Nth(1).Click()
page.GetByText("DCT Sample Product (3.0.0.0)").Click()
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Custom Markup
<dc-combobox data-dc-name="NewQuoteInput.ProductSelect" class="field is-required ng-untouched ng-pristine ng-invalid" required=""> <dc-label class="label dc-label"> <label class="label--text" for="cb_3" title="Product:">Product:</label> </dc-label> <div class="control-container"> <div class="control"> <div class="combobox"> <input autocomplete="off" type="text" id="cb_3" placeholder="" fieldref="NewQuoteInput.ProductSelect" class="ng-untouched ng-pristine ng-valid"> <button aria-label="expand" tabindex="-1" class="button" data-toggle="NewQuoteInput.ProductSelect"> <i aria-hidden="true" class="icon-caret-down"/> </button> <div class="drop-panel is-hidden has-alignment-left has-position-bottom"> <nav tabindex="-1" class="navigation" id="cb_3_options"> <a tabindex="-1" class="nav-link">DCT Sample Product (3.0.0.0)</a> </nav> </div> </div> </div> <p class="alert-message" id="cb_3_err">Required</p> <p class="alert-message" id="cb_3_err">Value selected is not a valid option</p> </div> </dc-combobox>
I am unable to select "DCT Sample Product (3.0.0.0)" from div>nav>a and click it programmatically. The way I could do it manually
` productinput := page.Locator("input[fieldref='NewQuoteInput.ProductSelect']")
productbtn := page.Locator("button[data-toggle='NewQuoteInput.ProductSelect']").Click() //This clicks & shows dropdown
I Even followed playwright codegen rewrite that in golang.It didn't work
page.Locator("div").Filter((playwright.LocatorFilterOptions{HasText: "DCT Sample Product (3.0.0.0)"})).Nth(1).Click()
page.GetByText("DCT Sample Product (3.0.0.0)").Click()
Beta Was this translation helpful? Give feedback.
All reactions