SharePoint Field Selectors


#1

I’m trying to create an automation that will loop through an Excel file, retrieve values and input them into a SharePoint form. I keep getting the Element not found error when I test run this. I have tried putting delays in prior to the execution of this input so as to give the page time to load and it doesn’t seem to matter. I’ve also tried about every way I can think of to ensure the selector is correct. I can code javascript in developer console in Chrome and see that the selector ID is correct in the console, but for some reason it doesn’t seem to work in the automation. The error I’m receiving is “Element not found using configured criteria”. The SharePoint element is an input field on a SharePoint Online form. In the automation I have it setup as Input, text, find by ID. The field name is FirstName and I have the display name and id as “FirstName_95c56076-e542-4979-ba1f-2e6205c28fd5_$TextField”. I can use a javascript function in the console to retrieve or set the value fine using this selector. Any advice on how to get this to work? Or do you have any tutorials on to build your selectors in SharePoint specifically? It seems like it doesn’t work the way it does with a standard html page/form? Thanks!


#2

Hi,

In order to perform standard share point operation (Upload/Download/ Copy/Delete/Move) there is SharePoint Operations activity. Try using that in case it fits i your use case

Also, for web scrapping part is the id which you mentioned is constant for every iteration or dynamic in nature. You can select other selector using manual selector approach

Regards,
Amit


#3

Thanks for the reply! The id is the same every time. I can inspect it in the test environment after it fails and it has the id as it appears in the automation. I’ve also tried using the manual option using all the attributes. Still no luck. Is there documentation on how to construct these? I’m doing it how it makes sense to me but not sure if it’s correct. I was hoping there was some documentation or a real world example of how to data scrap in SharePoint? I don’t have any issues doing this in a standard html page.

Thanks!


#4

Hi,

While using manual selector approach user needs to select attributes judiciously which identifies the web element uniquely.

If the id is remaining constant then try using java script executor activity and wrtite corresponding java script
document.getElementById('<webelementid>').click(). First test your java script in browser console.