How do you select an element in a dropdown who's if using it's id doesn't work?

252 views Asked by At

I am using Katalon recorder(chrome extension) to automate a form filling operation on the page "stuvia.com/upload" but I can't click on a dropdown element.

Here is the execution log.

[info] Playing test case Untitled Test Suite / Stuvia upload
[info] Time: Sat Apr 09 2022 01:05:04 GMT-0700 (Pacific Daylight Time) Timestamp: 1649491504473
[info] OS: Windows Version: 10
[info] Browser: Chrome Version: 100.0
[info] If the test cannot start, please refresh the active browser tab
[info] Executing: | open | https://www.stuvia.com/en-us/upload | |
[info] Wait for the new page to be fully loaded
[info] Executing: | click | id=aggreement-basisgegevens | |
[info] Wait for the new page to be fully loaded
[info] Executing: | click | xpath=//button[@type='submit'] | |
[info] Wait for the new page to be fully loaded

I encounter the problem here. The container's element selection is not recorded.

[info] Executing: | click | id=select2-type-doc-container |  |

I tried to manually add the script using the id of the element I wished to select (w598-6) but the text box remained empty after running it again.

[info] Executing: | click | id=select2-type-doc-container
[info] Wait until the element is found
[info] Cannot find element id=select2-type-doc-container-result-w598-6 after 1000ms switch to id=select2-type-doc-container

[info] Executing: | click | id=select2-type-doc-container | |
[info] Time: Sat Apr 09 2022 01:05:33 GMT-0700 (Pacific Daylight Time) Timestamp: 1649491533850
[info] Test case passed

I think I incorrectly used the id but have no idea how to do it. A nudge in the right direction would be highly appreciated.

0

There are 0 answers