Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Click an icon on a browser
#1
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 element
what 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>
Reply


Messages In This Thread
Click an icon on a browser - by cheeks13 - Aug-09-2018, 12:52 PM
RE: Click an icon on a browser - by metulburr - Aug-09-2018, 12:54 PM
RE: Click an icon on a browser - by cheeks13 - Aug-09-2018, 01:14 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  webdriver.remote to connect back existing browser without open new browser? gahhon 6 6,653 Feb-26-2019, 03:53 PM
Last Post: gahhon
  Click in the (…) icon in youtube with selenium PyChrome AcszE 6 16,104 Oct-19-2017, 02:45 AM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020