Support Portal

for ProcessRobot and WinAutomation

Start a new topic
Answered

Create folder on One Drive and copy link into a variable

Hello,

Could anybody, help with writing a job to:

1.  Create a Folder in One Drive (like: http://myCo.sharepoint.com/NewFolder)

2. Copy the newly created link into a variable %NewLink%


Thanks

AR


Best Answer

Using the "Get Details of Element on Web Page" action you can retrieve certain attributes of that element. In this case you would specify the "HRef" attribute:



Next, you will need an eligible control which will contain an hyper link. In my case for example, the web page looks like this:


By capturing the control for folder "test2" and modifying the selector I was able to get the link for that folder. The selector that was first extracted was:


div[id="appRoot"] > div[class="od-BasePage od-BasePage-leftNavVisible is-active"] > div[class="od-BasePage-belowHeader od-BasePage-belowHeader--flexbox"] > div[class="od-BasePage-belowBar"] > main[class="od-BasePage-content"] > div[class="od-BasePage-innerContent od-BasePage-addPaddingBottom"] > div[class="od-Files od-Files-dragAndDrop"] > div[class="od-FolderItemContent od-ItemContent"] > div[class="od-FolderItemContent-list od-ItemContent-list"] > div[class="od-TilesList"] > div[class="ms-Fabric root-121"] > div[class="root-122"] > div[class="ms-SelectionZone"] > div[class="ms-FocusZone ms-TilesList"] > div[class="ms-List"] > div[class="ms-List-surface"] > div[class="ms-List-page listPage_4aa03851"] > div[class="ms-TilesList-grid grid_4aa03851"] > div[class="ms-List-cell listCell_4aa03851"]:eq(1) > div[class="cell_4aa03851"] > div[class="cellContent_4aa03851"] > div[class="ms-Tile od-ItemTile2 od--hasContextMenu od-ItemTile2--isLarge tile_63bc8194 ms-Tile--isLarge isLarge_63bc8194 ms-Tile--isSelectable selectable_63bc8194 ms-Tile--invokable invokable_63bc8194"]


but that did not work, but modifying it to the following did:


body > div > div > div > div > div > main > div > div > div > div > div > div > div > div > div > div > div > div > div > div > div > div > div > a:eq(-1) 


Note that :eq(-1) in general means the last available item in a list.


ADMIN

Hello Alan,


Since this would be a process that would automate a task on a web site, you could use the available actions from the "Web Automation" group, in order to navigate to that page and perform the steps to create a new folder.

As for the link of the newly created folder, you could use the "Get Details of Element on Web Page" action to retrieve the HRef attribute of that element.

Thanks for the response;

I am able to create a new folder but I can't get the link of the newly created folder.

Could you please be more specific on how to achieve this?

Thanks


ADMIN
Answer

Using the "Get Details of Element on Web Page" action you can retrieve certain attributes of that element. In this case you would specify the "HRef" attribute:



Next, you will need an eligible control which will contain an hyper link. In my case for example, the web page looks like this:


By capturing the control for folder "test2" and modifying the selector I was able to get the link for that folder. The selector that was first extracted was:


div[id="appRoot"] > div[class="od-BasePage od-BasePage-leftNavVisible is-active"] > div[class="od-BasePage-belowHeader od-BasePage-belowHeader--flexbox"] > div[class="od-BasePage-belowBar"] > main[class="od-BasePage-content"] > div[class="od-BasePage-innerContent od-BasePage-addPaddingBottom"] > div[class="od-Files od-Files-dragAndDrop"] > div[class="od-FolderItemContent od-ItemContent"] > div[class="od-FolderItemContent-list od-ItemContent-list"] > div[class="od-TilesList"] > div[class="ms-Fabric root-121"] > div[class="root-122"] > div[class="ms-SelectionZone"] > div[class="ms-FocusZone ms-TilesList"] > div[class="ms-List"] > div[class="ms-List-surface"] > div[class="ms-List-page listPage_4aa03851"] > div[class="ms-TilesList-grid grid_4aa03851"] > div[class="ms-List-cell listCell_4aa03851"]:eq(1) > div[class="cell_4aa03851"] > div[class="cellContent_4aa03851"] > div[class="ms-Tile od-ItemTile2 od--hasContextMenu od-ItemTile2--isLarge tile_63bc8194 ms-Tile--isLarge isLarge_63bc8194 ms-Tile--isSelectable selectable_63bc8194 ms-Tile--invokable invokable_63bc8194"]


but that did not work, but modifying it to the following did:


body > div > div > div > div > div > main > div > div > div > div > div > div > div > div > div > div > div > div > div > div > div > div > div > a:eq(-1) 


Note that :eq(-1) in general means the last available item in a list.

Login or Signup to post a comment