[SOLVED] Extracting email address from LinkedIn 1st degree connection


I ended up using //*[text()[contains(.,’@’)]] after reviewing https://ui.vision/docs/selenium-ide/click#xpath-text.

Since the email address is the only “@” on that page, it works.

If there is a better way to do it, I’m open to suggestions.

I’m stumped on something that, at first glance, seems like it would be straightforward.

I want to update the email addresses for my 1st degree LinkedIn connections. The csv file of my LinkedIn contact info is about 4 years old so a number of the emails will be out-of-date.

The contact info page is located at LinkedInProfileURL/detail/contact-info (clicking on the “contact info” link in the profile summary.)

Email is one of the options. I can’t figure out how to find the proper ID to extract the email. It seems to be a dynamic “emberNUMBER” ID (e.g. ember444).


also a lot of… https://forum.ui.vision/search?expanded=true&q=dynamic%20id

I’m still having trouble getting this to work.

If I use:

//*[contains(@id, “ember”)]/div/section[4]/div

It will indeed pull the email address and add it to a csv file.

The issue I’m having now is that not all of the emails are in section 4; sometimes they are in section 3.

Here is the complete element:

div class=“pv-contact-info__ci-container”
a href=“mailto:EMAIL@ADDRESS” class=“pv-contact-info__contact-link t-14 t-black t-normal” target="_blank" rel=“noopener noreferrer”

(Sorry, I can’t figure out how to add code :grinning:)