0

I was trying to select a dropdown value in my app built in Angular. Here are my observations:

  • There is a select tag present in the dom with options tag underneath that. I tried making use of the select class to select the dropdown options and I was not successful. On inspecting the element, I learned that the element is hidden. Attaching the screenshot of the select elemententer image description here

  • I tried accessing the element with id "Location_chosen" and the elements beneath that as well ( a, span div, b). However each time I received an error, the element is not clickable at that point and some other element would receive the click.

  • identifier - css_Selector - #Location_chosen a - Operation - element.click() - Error - Message: element click intercepted: Element is not clickable at point (1677, 462)

  • identifier - css_Selector - #Location_chosen a span - Operation - element.click() - Error - Message: element click intercepted: Element <span style="border: none;">...</span> is not clickable at point (806, 463). Other element would receive the click: <div class="row display-flex m-l-5 ng-scope ng-enter-prepare" style="font-weight : bold" ng-repeat="formRow in dynamicForm.components ">...</div> (Session info: chrome=80.0.3987.122) . Now the element that is expected to be clicked in this exception is in a complete different row of the user form. Also, please note that I have used an explicit wait statement for the element to be clickable and no exception was thrown. But, after that element click is not working. enter image description here

petezurich
  • 9,280
  • 9
  • 43
  • 57
Ajmal Moideen
  • 170
  • 1
  • 6
  • 17
  • I have tried javascript click and actions click on the above elements as well. I couldn't click on the element – Ajmal Moideen Feb 28 '20 at 17:16
  • please post your code sample(what you have tried so far) – Sureshmani Kalirajan Feb 28 '20 at 17:28
  • It can be that drop-down web element is not visible, until you open it. – Ukrainis Feb 28 '20 at 19:56
  • I have tried `driver.execute_script("arguments[0].click();", element)` `element.click` `action.move_to_element(web_element).click(web_element).perform()` – Ajmal Moideen Mar 03 '20 at 15:13
  • I had installed Katalon recorder to record the ui operations through record and playback feature. Below is the code generated : `driver.find_element_by_xpath("//div[@id='Location_chosen']/a/span").click() driver.find_element_by_xpath("//div[@id='Location_chosen']/div/ul/li").click() ` This code worked when I played back the recorded script. however, when I used the same locator with my test scripts , it throws Elementclickintercepted exception. – Ajmal Moideen Mar 03 '20 at 15:15

0 Answers0