Unable to locate xpath element – Selenium, Python, Chromedriver

I’m new to coding and am trying to automate an onboarding process at my work.

adminB = driver.find_element(By.XPATH, '//*[@id="2rollUpBtnX"]/table/tbody/tr/td')
adminB.click()

^ This code is returning – “NoSuchElementException: Message: no such element: Unable to locate element: {“method”:”xpath”,”selector”:”//*[@id=”2rollUpBtnX”]/table/tbody/tr/td”}
(Session info: chrome=100.0.4896.60)

I’m getting the same error whenever I try to access any element on the page via xpath. I’ve also tried by name and element id. I suspect that all of the elements on the page are being hidden by the body. I have to inspect the element twice on the page to pull up any element. The first inspection pulls up the body, then the second one will pull up the desired element. Here’s what shows up on the first inspection.

<html><head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="./stylesheets/standard.css"><script type="text/javascript" language="javascript" src="./javascript/global.jmf"></script><script type="text/javascript" src="./javascript/cookie.jmf"></script><script type="text/javascript" language="JavaScript">

if (document.cookie)
{
    if (getCookieCount("vmf_ver") == 0)
    {
        DeleteAllCookies();
        setCookie("vmf_ver", "6.9.0.0", "01/01/2099");
    }
    else
    {
        if(getCookieNum("vmf_ver", getCookieCount("vmf_ver")) != "6.9.0.0")
        {
            alert("A new version of MailFlow has been detected!\r\n\r\nPlease clear your browser cache of\r\nall temporary Internet files.");
            setCookie("vmf_ver", "6.9.0.0", "01/01/2099");
        }
    }
}
function docSetLoading(show)
{
    if (show)
    {
        document.getElementById("titlebarstatusoff").style.display = "block";
        document.getElementById("titlebarstatuson").style.display = "none";         
    }
    else
    {
        document.getElementById("titlebarstatusoff").style.display = "none";
        document.getElementById("titlebarstatuson").style.display = "block";
    }
}

</script><title>VisNetic MailFlow</title>

</head><body id="mailflowBody" style="border:1px inset!important;overflow:hidden"><table style="height:100%;width:100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="border:1px outset;"><table style="table-layout:fixed;width:100%;background-image:url('./images/gradient.gif');background-repeat:no-repeat;background-color:#a6b1cc;" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td width="100%" nowrap="true"><table style="table-layout:fixed;width:100%;" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td unselectable="on" id="titlebarmenu" style="overflow:hidden;text-overflow:ellipsis;font-size:12pt;font-weight:bold;color:#FFFFFF;padding-left:6px;height:25px;"><span id="titlebarmenutext" unselectable="on">My Tickets</span></td><td width="199" height="25" align="right"><span id="titlebarstatusoff" style="display: block;"><a href="#" onclick="glo_launchModalWindow('about.ems', 450, 500);"><img src="./images/mailflowwhite.gif" width="199" height="25" border="0"></a></span><span style="padding-right: 6px; display: none;" id="titlebarstatuson"><img src="./images/loading.gif" width="16" height="16" border="0"></span></td></tr></tbody></table></td></tr></tbody></table></td></tr><tr><td style="height:100%;"><iframe id="theMainContain" name="theMainContain" style="width:100%;height:100%;" frameborder="0" scrolling="NO" src="main.ems"></iframe></td></tr></tbody></table>

<xml id="docXML"><root><user><id>558</id>

<useim>1</useim><newmessageformat>0</newmessageformat><useautofill>0</useautofill><outboundapproval>0</outboundapproval><outboundapprover>0</outboundapprover><stylesheetname>./stylesheets/standard.css</stylesheetname><menubackcolor>#D4D0C8</menubackcolor><isadmin>1</isadmin><escalatetoagentid>0</escalatetoagentid><quotemsginreply>1</quotemsginreply><replyquotedprefix>> </replyquotedprefix><forcespellcheck>1</forcespellcheck><signaturetopreply>1</signaturetopreply><showmessagesinbound>1</showmessagesinbound><usepreviewpane>1</usepreviewpane><closeticketaftersend>2</closeticketaftersend><autoroutetoinbox>2</autoroutetoinbox><usemarkasread>0</usemarkasread><markasreadseconds>5</markasreadseconds><defaultticketboxid>1</defaultticketboxid><defaultticketdblclick>0</defaultticketdblclick><readreceipt>0</readreceipt><deliveryconfirmation>0</deliveryconfirmation><statusid>1</statusid><statustext>Online</statustext><onlinetext>Online</onlinetext><awaytext>Away</awaytext><notavailtext>Not Available</notavailtext><dndtext>Do Not Disturb</dndtext><offlinetext>Offline</offlinetext><oootext>Out of Office</oootext><autostatustypeid>2</autostatustypeid><autostatusmin>0</autostatusmin><logoutstatusid>5</logoutstatusid><logouttext>Offline</logouttext><autotext>Away</autotext><access><contact>4</contact><stdresp>4</stdresp><stdreports>4</stdreports><schedreports>4</schedreports><autoopen>4</autoopen><agentaudit>4</agentaudit><voip>4</voip><pref>4</pref><prefgen>4</prefgen><preftb>4</preftb><prefav>4</prefav><prefsig>4</prefsig><prefmydict>4</prefmydict><prefmyfold>4</prefmyfold><prefmyal>4</prefmyal><prefmycont>4</prefmycont><rrtm>4</rrtm><ctas>4</ctas><rrr>4</rrr><rdc>4</rdc></access></user><document><lcid>1033</lcid><title>MailFlow</title><chgnotsavedmsg>Your changes have not been saved!</chgnotsavedmsg><useragent>Chrome</useragent><useros>Windows</useros><serverid>2</serverid><filename>mailflow.ems</filename><usehttps>1</usehttps><allowlogout>0</allowlogout><usevoip>0</usevoip><ticketclose>2</ticketclose><ticketroute>2</ticketroute><updatefreq>300</updatefreq><statusfreq>30</statusfreq><useverification>0</useverification><usedatetime>0</usedatetime><dateformat>0</dateformat><urlparameters></urlparameters></document></root></xml></body></html>

The second inspection pulls up where I am gettingthe xpath from.

I have tried accessing different elements on the page via xpath, element id, and name, but have had no luck.
I’ve also tried simulating a click on the body of the webpage and attempting to find the element after.
Here is my code so far..

import selenium
from selenium.webdriver.common.action_chains import ActionChains 
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium import webdriver
driver = webdriver.Chrome(executable_path="C:\Users\user.name\Documents\VSCode\Chromedriver\chromedriver.exe")
driver.get("https://website-here.ems") ## I've put in the actual address in my code.

input("Login, then hit enter.")

adminB = driver.find_element(By.XPATH, '//*[@id="2rollUpBtnX"]/table/tbody/tr/td')
adminB.click()

The same script on a different website works as intended.

import selenium
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium import webdriver
driver = webdriver.Chrome(executable_path="C:\Users\user.name\Documents\VSCode\Chromedriver\chromedriver.exe")
driver.get("https://www.python.org/")

input("Login, then hit enter.")

adminB = driver.find_element(By.XPATH, '//*[@id="documentation"]/a')
adminB.click()

Time doesn’t seem to be a factor in this problem. I’ve waited 3-5 minutes before hitting enter after the page loads.
Any pointers on how to proceed would be appreciated.