# \[Need Help\] Selenium - github assert username

**URL:** <https://forum.codewithmosh.com/t/need-help-selenium-github-assert-username/11098>\
**Category:** Python\
**Created:** [March 6, 2022, 4:46pm UTC](https://forum.codewithmosh.com/t/need-help-selenium-github-assert-username/11098 "2022-03-06T16:46:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevin.carbonaro](https://avatars.discourse-cdn.com/v4/letter/k/53a042/32.png) [@kevin.carbonaro](https://forum.codewithmosh.com/u/kevin.carbonaro)\
**Post date:** [March 6, 2022, 4:46pm UTC](https://forum.codewithmosh.com/t/need-help-selenium-github-assert-username/11098/1 "2022-03-06T16:46:48Z")

</div>

I have managed to login to GitHub and even automated the click on the User Dropdown menu, however cannot manage to get the innerHTML to be able to use assert to check that the user profile name matches.

below is the part of the code which is not working well. The error I am getting is that user-profile-link element cannot be found.

```auto
user_menu = browser.find_element_by_xpath(
    "//*[@aria-label='View profile and more']")
user_menu.click() # till here it works to click on dropdown

# the following is not working

profile_link = browser.find_element_by_class_name("user-profile-link")
link_label = profile_link.get_attribute("innerHTML")
assert "kevincarbonaro" in link_label

```

Would appreciate some help to get this working and understand what I am doing wrong.

Thanks
