I have currently written a code that clicks around on share point using selenium on Microsoft edge. On one of the pages there are two areas that when you click on them the option bar at the top changes depending what area you click on and I need to get to the right area to click the right options. I am trying to click in the right area but currently I won't let me and I get an error that reads
selenium.common.exceptions.NoSuchElementException: Message: No such elementwhat im trying to use is
driver.find_element_by_id("QCB1").click()when I go to the area and right click to inspect element this is the html code for that area. (I got this from the internet explorer browser)
<div class="ms-listview-qcbContainer"> <div class="ms-qcb-root" id="QCB1"> <ul class="ms-qcb-zone ms-qcb-leftzone"> <li class="ms-qcb-item"> <button title="Create a new document or folder in this library." class="ms-qcb-button js-listview-qcbNewButton js-callout-body js-qcb-button js-callout- launchPoint" id="QCB1_Button1" role="button" accesskey="n" onclick='Renderer.FunctionDispatcher.Execute (this,0,"itemClick",event,Renderer.FunctionDispatcher.GetObject(0))' type="button" aira-expanded="false"> <span class="ms-qcb-glyph ms-listview-glyphwithmargin ms-core-form-heading ms-listview-new-glyph ms-listview-new-glyph-circle "></span>New<span class="ms-qcb-glyph "> </span></button></li> <li class="ms-qcb-item"><button title="Upload a document from your computer to this library." class="ms-qcb-button ms-qcb-buttons-alignmentfix js-listview-qcbUploadButton js-callout-body js-qcb-button " id="QCB1_Button2" role="button" accesskey="u" onclick='Renderer.FunctionDispatcher.Execute(this,0,"itemClick",event,Renderer.FunctionDispatcher.GetObject(1))' type="button" aira-expanded="false"><span class="ms-qcb-glyph ms-listview-glyph-withmargin ms-core-form-heading "></span>Upload<span class="ms-qcb-glyph "></span></button></li> <li class="ms-qcb-item"><button title="Create a synchronized copy of this library on your computer." class="ms-qcb-button ms-qcb-buttons-alignmentfix js-listview-qcbSyncButton js-callout-body js-qcb-button " id="QCB1_Button3" role="button" accesskey="y" onclick='Renderer.FunctionDispatcher.Execute(this,0,"itemClick",event,Renderer.FunctionDispatcher.GetObject(2))' type="button" aira-expanded="false"><span class="ms-qcb-glyph ms-listview-glyph-withmargin ms-listview-sync-glyph ms-core-form-heading "></span>Sync<span class="ms-qcb-glyph "></span></button></li> <li class="ms-qcb-item"><button title="Invite people to a selected document or folder." class="ms-qcb-button ms-qcb-buttons-alignmentfix js-listview-qcbShareButton js-callout-body js-qcb-button " id="QCB1_Button4" role="button" accesskey="s" onclick='Renderer.FunctionDispatcher.Execute(this,0,"itemClick",event,Renderer.FunctionDispatcher.GetObject(3))' type="button" aira-expanded="false"><span class="ms-qcb-glyph ms-listview-glyph-withmargin ms-core-form-heading "></span>Share<span class="ms-qcb-glyph "></span></button></li> <li class="ms-qcb-item"><button title="Do other activities with selected documents or folders." class="ms-qcb-button ms-qcb-buttons-alignmentfix js-listview-qcbManageButton js-callout-body js-qcb-button " id="QCB1_Button5" role="button" accesskey="m" onclick='Renderer.FunctionDispatcher.Execute(this,0,"itemClick",event,Renderer.FunctionDispatcher.GetObject(4))' type="button" aira-expanded="false"><span class="ms-qcb-glyph "></span>More<span class="ms-qcb-glyph ms-listview-manage-glyph ms-toolbar "></span></button></li> </ul><ul class="ms-qcb-zone ms-qcb-rightzone"> </ul><hr class="ms-qcb-clearSeparator"></div></div>