I have a website that contains reports (with columns and rows). There is a menu on top of the page for different page controls (see image here https://ibb.co/hfjGScd). Among the page controls, there is one where user can select "partial" or "full" view of the report. When the page is loaded, the default view is "partial" report.
I want to automate selecting the "full" report using selenium and python, but I cannot find the element. The issue is that when the page is loaded in default "partial" report, I cannot find the html element related to "full" report. The html element becomes available in the source html only when the user selects it from the drop-down list. And when the "full" report is selected, the html element for the "partial" report disappears from the source html.
Here is html code for the default "partial report":
<div id="jro_view_partialdata" style="float:left;height:20px;padding:1px 0px;">
<div id="_g0rmph" class="jsvm--com partialDataCtrlBox" style="position: relative; left: 0px; top: 0px; height: 18px; z-index: 0;"><div id="cboScopeType" class="jsvm--com jsvm_flatCombo partialDataCtrlBox_cboScopeType" style="position: absolute; width: 88px; height: 16px; z-index: 0;"><div id="dItemContainer" class="jsvm--com jsvm_flatCombo_dItemContainer partialDataCtrlBox_cboScopeType_dItemContainer" style="position: absolute; z-index: 0; width: 68px; height: 12px;"><div id="_q5cgw5" class="jsvm--com jsvm_flatCombo_dItem partialDataCtrlBox_cboScopeType_dItem" style="position: absolute; z-index: 0; width: 68px; height: 12px;"><span id="label" class="jsvm--com jsvm_flatCombo_dItem_label partialDataCtrlBox_cboScopeType_dItem_label" noncomp="true" style="position: absolute; display: block; white-space: nowrap; line-height: 16px; top: -2px; width: 68px;">Partial Data</span></div></div><div id="btnDropDown" class="jsvm--com jsvm_flatCombo_dropdown partialDataCtrlBox_cboScopeType_dropdown" style="position: absolute; z-index: 0; left: 72px; height: 16px;"><img id="icon" class="jsvm--com jsvm_flatCombo_dropdown_icon partialDataCtrlBox_cboScopeType_dropdown_icon" src="https://acell.mastercontrol.com/acell_analytics/webos/style/default/images/0-dropdown_new.png" style="position: absolute; display: block; left: 0px; top: 0px;"></div></div><div id="iptRecords" class="jsvm--com jsvm_textfield partialDataCtrlBox_iptRecords" style="position: absolute; z-index: 0; left: 92px;"><input type="text" name="iptRecords_input" id="iptRecords_input" autocomplete="off" class="jsvm--txt jsvm_textfield_input partialDataCtrlBox_iptRecords_input" style="position: absolute; left: 2px; top: 0px; margin: 0px; border: 0px none; outline: none; resize: none; overflow: hidden; width: 32px; height: 14px; line-height: 14px;"></div></div></div>
And here is the html code when "full report" is selected by the user:
<div id="jro_view_partialdata" style="float:left;height:20px;padding:1px 0px;">
<div id="_g0rmph" class="jsvm--com partialDataCtrlBox" style="position: relative; left: 0px; top: 0px; height: 18px; z-index: 0; width: 90px;"><div id="cboScopeType" class="jsvm--com jsvm_flatCombo partialDataCtrlBox_cboScopeType" style="position: absolute; width: 88px; height: 16px; z-index: 0;"><div id="dItemContainer" class="jsvm--com jsvm_flatCombo_dItemContainer partialDataCtrlBox_cboScopeType_dItemContainer" style="position: absolute; z-index: 0; width: 68px; height: 12px;"><div id="_nshuew" class="jsvm--com jsvm_flatCombo_dItem partialDataCtrlBox_cboScopeType_dItem" style="position: absolute; z-index: 0; width: 68px; height: 12px;"><span id="label" class="jsvm--com jsvm_flatCombo_dItem_label partialDataCtrlBox_cboScopeType_dItem_label" noncomp="true" style="position: absolute; display: block; white-space: nowrap; line-height: 16px; top: -2px; width: 68px;">Full Data</span></div></div><div id="btnDropDown" class="jsvm--com jsvm_flatCombo_dropdown partialDataCtrlBox_cboScopeType_dropdown" style="position: absolute; z-index: 0; left: 72px; height: 16px;"><img id="icon" class="jsvm_flatCombo_dropdown_icon partialDataCtrlBox_cboScopeType_dropdown_icon" src="https://acell.mastercontrol.com/acell_analytics/webos/style/default/images/0-dropdown_new.png" style="position: absolute; display: block; left: 0px; top: 0px;"></div></div><div id="iptRecords" class="jsvm--com jsvm_textfield partialDataCtrlBox_iptRecords jsvm_textfield_16" style="position: absolute; z-index: 0; left: 92px; display: none;"><input type="text" name="iptRecords_input" id="iptRecords_input" autocomplete="off" class="jsvm--txt jsvm_textfield_input partialDataCtrlBox_iptRecords_input" style="position: absolute; left: 2px; top: 0px; margin: 0px; border: 0px none; outline: none; resize: none; overflow: hidden; width: 32px; height: 14px; line-height: 14px;"></div></div></div>
I am using the following code to click on the drop-down menu:
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div[1]/div[3]/table/tbody/tr/td/div[1]/div[17]/div/div[1]/div[1]/div/span"))).click()
which works fine. After running the above code, the drop down menu is clicked and I can see both "Full" and "Partial" options; but I don't know how to select the "Full" report.
Any help is appreciated.
HTML Sourcefor the element you want toclickand thecodethat you tried so far witherrorthat you're getting ?