0

I was wondering if there was a way to select a selection from the dropdown menu where all the selection is populated from the database and does not have any selectors.

As it does not have any selectors we cannot use await page.select("selector",'dropdown') I have also tried using

await page.evaluate(() => {
  document.querySelector(`select [value="District"]`).selected = true);
});

Right now just to make it work I am using

    Page.keyboard.press('ArrowDown')
    page.keyboard.press('ArrowDown')
    page.keyboard.press('Enter')

which selects the selection I want but I don't think this is an appropriate way to select a selection from a dropdown.

There must be a proper way, Any help is highly appreciated!

Denish
  • 73
  • 1
  • 8
  • 1
    what do you mean by `all the selection is populated from the database and does not have any selectors.` it doesn't make sense ... maybe a picture can be helpful – hretic Jun 12 '19 at 11:12
  • @hretic I mean that after the dropdown is clicked a query runs which populates the all the dropdown values not that the values are populated from the frontend! – Denish Jun 13 '19 at 15:40

0 Answers0