I am new to Selenium and HTML. I am trying to click on one of the navigation menu options.
Here is the screenshot:
And here is the code I get when I inspect the element:
<A onclick="click_shelltab2('reports','tab_reports')" href="https://abhow.onesite.realpage.com/100/multishell/shell.htm?c=111101011111000001000001101000010011010010000000100010000000000101001000000100100000000010,176819146,USER&u=100,111111111011100#"><SPAN class="rp-global-nav-menu-item-label-icon fa fa-calendar-check-o"></SPAN><SPAN class=rp-global-nav-menu-item-label-text>Scheduled Events</SPAN></A>
<SPAN class="rp-global-nav-menu-item-label-icon fa fa-calendar-check-o"></SPAN>
<SPAN class=rp-global-nav-menu-item-label-text>Scheduled Events</SPAN>
/a>
How do I get it work?
I tried using following:
wait2.until(lambda driver: driver.find_element_by_xpath("//a[@id='tab_reports']")).click()
and
wait2.until(lambda driver: driver.find_element_by_xpath("//a[@text='Scheduled Events']")).click()
and
wait(driver, 10).until(EC.element_to_be_clickable((By.XPATH,"//span[text()='Scheduled Events']"))).click()
Update:
when I use Xpath = `//*[@id="tab_reports"]/span/a'
it gives this error:
ElementClickInterceptedException: element click intercepted: Element <a class="" href="#" onclick="doActionSupportCrossBrowser('Scheduled Events', tab_reports_center);">...</a> is not clickable at point (267, 152). Other element would receive the click: <iframe id="ifrmShell" name="ifrmShell" style="border:none;display:inline;border-left:1px solid #000000;height:100%;margin-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;width:99.95%;" frameborder="0" scrolling="auto" src="/shell_cb/nav/iframe_init.htm"></iframe>
(Session info: chrome=81.0.4044.129)
Please help.
Thanks in advance.