Support Portal

for ProcessRobot and WinAutomation

Start a new topic
Answered

Getting error while selecting an element on MS Forms

Hi team,


I was working on my first use case of web automation and was playing around with action of 'Focus text field' and 'Populate text field'. I thought it will be simple to get the questions and text field from MS forms but it seems I am running into issue by getting the below error. How should i resolve or what will be the best way to get question and text field on MS forms page to be populated automatically?


Runtime Error: Form Field with selector 'div[id="form-container"] > div[class="form-content"] > div[class="form-content-container"] > div[class="office-form-content office-form-page-padding"] > div > div[class="office-form office-form-theme-shadow"] > div[class="office-form-body"] > div:eq(1) > div[class="__question__ office-form-question"]:eq(0) > div[class="office-form-question-content office-form-theme-focus-border"] > div[class="office-form-question-element"] > div[class="student-feedback-view-short-text-field-with-correctness"] > div > div[class="office-form-textfield"] > input[class="office-form-question-textbox office-form-textfield-input form-control border-no-radius"][type="text"]' not found.


Best Answer

Hello Vaibhav,


Most probably, with the help of UISpy,  you will be able to take the controls of a web page.

In other cases, certain web pages change their underlying HTML code dynamically by which some selectors changes dynamically, it means that the selector might change if we reload the web page or if we navigate to that page in a different way. 

So, you will need to modify the selector accordingly. Kindly check the following:


capturing-css-selectors-in-dynamically-changing-web-pages

manipulating-css-selectors-to-handle-dynamic-web-pages 

what-is-a-css-selector 


If you require any further assistance,feel free to contact us at "support@softomotive.com".








ADMIN
Answer

Hello Vaibhav,


Most probably, with the help of UISpy,  you will be able to take the controls of a web page.

In other cases, certain web pages change their underlying HTML code dynamically by which some selectors changes dynamically, it means that the selector might change if we reload the web page or if we navigate to that page in a different way. 

So, you will need to modify the selector accordingly. Kindly check the following:


capturing-css-selectors-in-dynamically-changing-web-pages

manipulating-css-selectors-to-handle-dynamic-web-pages 

what-is-a-css-selector 


If you require any further assistance,feel free to contact us at "support@softomotive.com".







Hi Tejaswini.


Thanks for letting me know!


I did use UISpy but again it wasnt capturing anything, does that mean MS - Forms has changing / Dynamic HTML code?


What I also did , I used Web recorder to record the steps. As soon as i played the steps again, before the submit  button the values are getting refreshed and it basically submits blank  values. Not sure if its something to do with HTML code. Any guidance will be helpful..


Thanks again!

Login or Signup to post a comment