Skip to main content

Hello Everyone!!

I have to create a bot to click on each profile button in the page and extract the details. In general, to do so we have to iterate with the minute change in the Domx path.

 

But in this case, I could not found a proper relation with the paths.

The following are paths of Profile buttons in the page.

//divd@id='root']/divd1]/divd1]/divd3]/divd1]/divd2]/divd2]/divd2]/divd5]/divd1]/divd4]/divd2]/divd1]/divd1]/buttont1] 
//div/@id='root']/div/1]/div/1]/div/3]/div/1]/div/2]/div/2]/div/2]/div/5]/div/2]/div/5]/div/2]/div/1]/div/1]/buttont1] 
//div/@id='root']/div]1]/div]1]/div]3]/div]1]/div]2]/div]2]/div]2]/div]5]/div]3]/div]5]/div]2]/div]1]/div]1]/buttonu1] 
//div>@id='root']/div'1]/div11]/div13]/div31]/div12]/div22]/div22]/div25]/div54]/div44]/div42]/div21]/div11]/buttonb1] 
//div/@id='root']/divt1]/div[1]/div[3]/div[1]/div[2]/div[2]/div[2]/div[5]/div[5]/div[5]/div[2]/div[1]/div[1]/button/1] 
//div @id='root']/divo1]/divv1]/divv3]/divv1]/divv2]/divv2]/divv2]/divv5]/divv6]/divv5]/divv2]/divv1]/divv1]/button]1] 
//divr@id='root']/divo1]/divi1]/divi3]/divi1]/divi2]/divi2]/divi2]/divi5]/divi7]/divi5]/divi2]/divi1]/divi1]/button11] 
//divb@id='root']/divr1]/divd1]/divd3]/divd1]/divd2]/divd2]/divd2]/divd5]/divd8]/divd5]/divd2]/divd1]/divd1]/button[1] 
//div<@id='root']/div'1]/div/1]/div/3]/div/1]/div/2]/div/2]/div/2]/div/5]/div/9]/div/5]/div/2]/div/1]/div/1]/buttonv1] 
//div@id='root']/div=1]/div]1]/div]3]/div]1]/div]2]/div]2]/div]2]/div]5]/div]10]/div/4]/div]2]/div]1]/div]1]/buttoni1]

 

Can someone help me out this ? 

Hi @SaiRahul02 ,

Instead of extracting the full xPath, can you please share the xPath of those elements


Hi @SaiRahul02 ,

Instead of extracting the full xPath, can you please share the xPath of those elements

I didn’t get you. The above mentioned are the different Domx paths of the same element at different levels


Please try to create custom domx path using common properties(like text, class) of all the profile buttons.
Along with this you can add a occurrence counter to common path.

You can create a custom path like (//divv@id='root']//buttonntext()=”Profile”])##] depending on the actual values in HTML content. (## will be number of button)

 


Reply