Get the what's app number from chat windows using 'https://web.whatsapp.com/' and selector not working

Hi All,

I’m trying to get the what’s app number from the chat window using https://web.whatsapp.com/.

I’m using get text activity. But it’s not working and not able to extract the number.
Also, whenever user is online selector changes the position as well. As it shows online, it’s shows mobile number on the top and below it’s showing ‘Online’.

How to deal with the problem? Any other approach or solution?
Also, if you have made any workflow, that would be helpful.

Also, I’m using this selector for ‘get text’ activity :

<html app='chrome.exe' title='WhatsApp' />
<webctrl aaname='*' parentid='main' tag='SPAN' />

But, it’s giving me blank value.

Thanks,
Shantanu

@shreyash_shirbhate @Parth_Doshi

Hi!

You can try this!

Take one element exists activity(With/Without showing online) output as exists.

take one if condition(Exists=True)

Then: Get Text
Else: Get Text

I hope this will works for you!

Regards,
NaNi

Ok, sure will check this approach :

Also, I’m using this selector for ‘get text’ activity :

<html app='chrome.exe' title='WhatsApp' />
<webctrl aaname='*' parentid='main' tag='SPAN' />

But, it’s giving me blank value?

Hi!

Could you please open it with the UiExplorer so that we may have more options to make it strong and dynamic.

you can uncheck the parentId.

Regards,
NaNi

Already tried that. Already using ‘UI Explorer’ only.

Hey @Shantanu_More1 !! Try this approach!!

  • Step 1: Anchor base!

  • Step 2: The “Find Element” Selector. Let’s use the Anchor in the find element on the left, on the person’s photo icon.

  • Step 3: Let’s use “Get Text” in the overarching context, to ensure the scope of the text. Take a look:


  • Result: Maybe in this case you extract the text “Online” as well in addition to the number when the person is online. MAs is extremely easy to treat. You can further study the organization of the xml tree to try to get this information in a more specific selector.

Hope this helps!

Here is the solution:

Whether person is online or offline. Following selector can be in get text activity to extract the number from chat window.

<html app='chrome.exe' title='WhatsApp' />
<webctrl aaname='+*' parentid='main' tag='SPAN' />

Thanks,
Shantanu

Hi gabrielribas4, Thanks for the reply. I have got following selector.

Whether person is online or offline. Following selector can be in get text activity to extract the number from chat window.

<html app='chrome.exe' title='WhatsApp' />
<webctrl aaname='+*' parentid='main' tag='SPAN' />

Thanks,
Shantanu

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.