Use click activity with relative selector and pass the name(“thanks for not telling tom”) dynamically in the selector.
Thanks @ghazanfar , I will check and revert you back.
Hi @ghazanfar , Unfortunately Data Scraping for many pages didn’t work, I got the following error message :
Hi @hsendel !
We will work together using selectors method to see if it helps
First, to help you further, we would need you to do the following steps:
- Open UiExplorer this way, then click on “Indicate Element”:
- Once you’ve hit the button, you’ll need to indicate the first element:
To know if the bot is able to recognize every element on your page, you’ll notice that everytime you hover on an element of your page, the bot makes it blue:
- Once you’ve indicated the element, you’ll be back to this page. We’ll need you to attach a screenshot of UiExplorer, knowing that the data we need to help you is on the right:
- Hit again on “Indicate element”, and this time indicate the 2nd row at the same logo:
- Send us the 2 results of UiExplorer, keeping in mind that we need to see the data on the right
Let us know if the indications are unclear, or if you encounter any problem during the process
Thanks @Hiba_B , Till now , I’m able to fix my issue related to Data Extraction, It was just a tricky thing on which item you need to select . I will check your recommendations to continue my workflow.
I just see that you’ve provided steps to extract those data too, good, this is solved, now need to “Click” on White icon than Click on the black one to download the desired file for a given expression to the left .
Here’s the Link if you want to check exactly what I mean :
Sentences in English with audio - Tatoeba
Note : Please find in attached file a demonstration
Ok, gonna start working on it tomorrow (thursday).
So we need to click on both the elements (1 & 2) right ? Until the last page ? (6128)
→ EDIT: do you need to stock the expressions somewhere ? (excel file, text file, word file)
Hi @Hiba_B Thanks for prompt feedback
I’m able to store the same in excel sheet, just by using Write Data and as Input I use Datatable : ExtractedData generated from previous step.
Yes, My Query is to Click on (1) to copy the content and I will use it to name the file that will be downloaded from (2) … Something like that…At the end I will get a list of Audio files that have names as the expression to the left. Got it ?
Yes: perfect explanation
I will send you a xaml suggestion by thursday afternoon just after work
Thanks a lot but better to just explain to me how to do that at the beginning, and in case I will not be able to do that , I will ask for that , OK?
Sure let’s do it this way
Once you follow the steps I’ve given earlier (about UiExplorer), if you check all the checkboxes, you need to compare the buttons to see if there is a logic behind:
Line 4: <html app='chrome.exe' title='Phrases en anglais avec enregistrement sonore — Tatoeba' /> <webctrl css-selector='body>div>div>div>section>md-content>div>div>div>div>svg' parentid='translation_3204100_' tag='svg' isleaf='0' parentclass='copy-btn' title='Phrases en anglais avec enregistrement sonore — Tatoeba' /> Line 3: <html app='chrome.exe' title='Phrases en anglais avec enregistrement sonore — Tatoeba' /> <webctrl css-selector='body>div>div>div>section>md-content>div>div>div>div>svg>use' parentid='translation_3204089_' tag='use' isleaf='1' parentclass='copy-btn' title='Phrases en anglais avec enregistrement sonore — Tatoeba' /> Line 2: <html app='chrome.exe' title='Phrases en anglais avec enregistrement sonore — Tatoeba' /> <webctrl css-selector='body>div>div>div>section>md-content>div>div>div>div>svg>use' parentid='translation_3204088_' tag='use' isleaf='1' parentclass='copy-btn' /> Line 1: <html app='chrome.exe' title='Phrases en anglais avec enregistrement sonore — Tatoeba' /> <webctrl css-selector='body>div>div>div>section>md-content>div>div>div>div>svg' tag='svg' isleaf='0' parentclass='copy-btn' parentid='translation_3204087_' title='Phrases en anglais avec enregistrement sonore — Tatoeba' />
We notice for instance for the button that two elements indicates it: parentclass and parentid. And parentid starts at the 1st line at the form of ‘translation_3204087_’ then increase its number for each row.
So if you want to click on the 1st copy button, you need to do the following:
Note that copy_btn_selector is a string, and number_of_row is an Int32.
You’ll need to look for the same logic for the button
Let us know if you need more indication for your workflow.
Well explained @Hiba_B , especially when introducing those 2 Parameters : parentclass and parentid to be able to identify each line,
But my question is : How to be able to extract the total list and export it to excel ( as I did before), at the same time we download those files using for each activity ?
For example, Do we need to extract all “number_of_row” items ( during Data Scraping) than based on this, we use “For Each” activity to Copy&Download all files , or we do something else ?
Thanks in Advance
Usually to extract the whole list, I’d use Data Scraping: ![image|75x93]
When you got the error, what was the page ? We might use several datascraping to do it. Do you confirm that when you tried Data Scraping, you put MaxOfResults to -1 ?
If we try to bypass it and use artisanal way, I’d way to use UiExplorer and find the interesting tags to keep.
Once done, I would calculate the number of results per page (here 99).
Then I would use a while loop. We know that we have 99 lines per page, and we know that we have 6130 pages, so I use an index put to number_of_row, out of the while condition, and for the while condition I’d say while number_of_row <= 3204087 + 99 * 6130.
Then inside the while I’d put an add datarow to a clean datatable (that has only 1 column) followed by a get attribute (and that attribute willl take the expressions, then an assign that puts the expression in the datatable, then click on audio with the fabricated selector
I don’t know if I pictured it well ^^’
Let us know if you need more info or ideas
Thanks @Hiba_B Sounds very interesting i will check deeply and let you know.
->Edit : I see one issue here what if those numbers are changing: number of lines in a page and number of pages?, Is the method using UiExplorer still applicable here?
Also number_of_row will for sure not attending this value = 3204087 + 99 * 6130., because generaly the 6130th page is not full.
@Hiba_B has already helped you clear your doubts.
I remember from one of the challeges there was a nice way of downloading files: Advent Challenge #3 - #7 by SamiKiran
Study the cool solution from @Anna_Maziarz
In your case, you need to first get the url attribute from that file like icon and then use the approach from @Anna_Maziarz
Thanks a lot @jeevith , I learn from you too a lot in the past
By the way is there any special link in this forum where I can find all those challenges, I remember you shared one some months ago regarding iterations.
Forum is a great place to learn. It is just plain fun.
Yes @AndersJensen had ensured the challenges were traceable. Here is the link to all Advent 2020 challenges:
Hi @hsendel !
Here is a suggestion: Click_on_language_buttons.xaml (36.8 KB)
Let us know if it does not work as expected
I only tried it on 2 pages and 3 audios for each page, but if it works with 2 it should work with 6132 pages
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.