Oct-19-2017, 04:01 PM
Hello, I'm trying to click on a drop-down button in selenium pyChrome, but nothing seems to work for me
by clicking on the inspect option in the button I get:
I have tried with several numbers of xpath like:
I have tried with class or id attributes too but they are not clickable or maybe I'm doing something wrong. I would apreciate some help for this, thank you!

<paper-dropdown-menu no-label-float="" class="style-scope yt-options-renderer" role="combobox" aria-autocomplete="none" aria-haspopup="true" aria-disabled="false">
<span role="button" class="style-scope paper-dropdown-menu"></span>
<paper-menu-button id="menuButton" close-on-activate="" class="style-scope paper-dropdown-menu" role="group" aria-haspopup="true" aria-disabled="false" horizontal-align="right" vertical-align="top">
<div id="trigger" class="style-scope paper-menu-button">
<div class="dropdown-trigger style-scope paper-dropdown-menu" slot="dropdown-trigger">
<paper-ripple class="style-scope paper-dropdown-menu">
<div id="background" class="style-scope paper-ripple"></div>
<div id="waves" class="style-scope paper-ripple"></div>
</paper-ripple>
<paper-input type="text" readonly="" class="style-scope paper-dropdown-menu" tabindex="0" aria-disabled="false">
<paper-input-container class="style-scope paper-input">
<template is="dom-if" class="style-scope paper-input-container"></template>
<div class="input-content label-is-hidden style-scope paper-input-container">
<div class="label-and-input-container style-scope paper-input-container" id="labelAndInputContainer">
<label aria-hidden="true" for="input" class="style-scope paper-input" id="paper-input-label-6"> </label><input is="iron-input" id="input" class="style-scope paper-input" autocomplete="off" placeholder="" readonly="" autocapitalize="none" autocorrect="off" aria-describedby="" aria-labelledby="paper-input-label-6" type="text" tabindex="0"><template is="dom-if" class="style-scope paper-input"></template><template is="dom-if" class="style-scope paper-input"></template>
</div>
<iron-icon icon="paper-dropdown-menu:arrow-drop-down" suffix="" slot="suffix" class="style-scope paper-dropdown-menu"><svg viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" focusable="false" class="style-scope iron-icon" style="pointer-events: none; display: block; width: 100%; height: 100%;"><g class="style-scope iron-icon"><path d="M7 10l5 5 5-5z" class="style-scope iron-icon"></path></g></svg>
</iron-icon>
</div>
<div class="underline style-scope paper-input-container">
<div class="unfocused-line style-scope paper-input-container"></div>
<div class="focused-line style-scope paper-input-container"></div>
</div>
<div class="add-on-content style-scope paper-input-container">
</div>
</paper-input-container>
</paper-input>
</div>
</div>
<iron-dropdown id="dropdown" class="style-scope paper-menu-button" aria-disabled="false" aria-hidden="true" horizontal-align="right" vertical-align="top" style="outline: none; display: none;">
<div id="contentWrapper" class="style-scope iron-dropdown">
<div class="dropdown-content style-scope paper-menu-button" slot="dropdown-content">
<paper-listbox class="dropdown-content style-scope yt-options-renderer" slot="dropdown-content" role="listbox" aria-expanded="false" tabindex="0">
<paper-item class="style-scope yt-options-renderer iron-selected" role="option" tabindex="0" aria-disabled="false" aria-selected="true">
<yt-formatted-string class="style-scope yt-options-renderer">Choose one</yt-formatted-string>
</paper-item>
<paper-item class="style-scope yt-options-renderer" role="option" tabindex="-1" aria-disabled="false">
<yt-formatted-string class="style-scope yt-options-renderer">Promotes hatred or violence</yt-formatted-string>
</paper-item>
<paper-item class="style-scope yt-options-renderer" role="option" tabindex="-1" aria-disabled="false">
<yt-formatted-string class="style-scope yt-options-renderer">Abusing vulnerable individuals</yt-formatted-string>
</paper-item>
<paper-item class="style-scope yt-options-renderer" role="option" tabindex="-1" aria-disabled="false">
<yt-formatted-string class="style-scope yt-options-renderer">Bullying</yt-formatted-string>
</paper-item>
<paper-item class="style-scope yt-options-renderer" role="option" tabindex="-1" aria-disabled="false">
<yt-formatted-string class="style-scope yt-options-renderer">Abusive title or description</yt-formatted-string>
</paper-item>
<template is="dom-repeat" as="subOption" class="style-scope yt-options-renderer"></template>
</paper-listbox>
</div>
</div>
</iron-dropdown>
</paper-menu-button>
</paper-dropdown-menu>
<span role="button" class="style-scope paper-dropdown-menu"></span>
<paper-menu-button id="menuButton" close-on-activate="" class="style-scope paper-dropdown-menu" role="group" aria-haspopup="true" aria-disabled="false" horizontal-align="right" vertical-align="top">
<div id="trigger" class="style-scope paper-menu-button">
<div class="dropdown-trigger style-scope paper-dropdown-menu" slot="dropdown-trigger">
<paper-ripple class="style-scope paper-dropdown-menu">
<div id="background" class="style-scope paper-ripple"></div>
<div id="waves" class="style-scope paper-ripple"></div>
</paper-ripple>
<paper-input type="text" readonly="" class="style-scope paper-dropdown-menu" tabindex="0" aria-disabled="false">
<paper-input-container class="style-scope paper-input">
<template is="dom-if" class="style-scope paper-input-container"></template>
<div class="input-content label-is-hidden style-scope paper-input-container">
<div class="label-and-input-container style-scope paper-input-container" id="labelAndInputContainer">
<label aria-hidden="true" for="input" class="style-scope paper-input" id="paper-input-label-6"> </label><input is="iron-input" id="input" class="style-scope paper-input" autocomplete="off" placeholder="" readonly="" autocapitalize="none" autocorrect="off" aria-describedby="" aria-labelledby="paper-input-label-6" type="text" tabindex="0"><template is="dom-if" class="style-scope paper-input"></template><template is="dom-if" class="style-scope paper-input"></template>
</div>
<iron-icon icon="paper-dropdown-menu:arrow-drop-down" suffix="" slot="suffix" class="style-scope paper-dropdown-menu"><svg viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" focusable="false" class="style-scope iron-icon" style="pointer-events: none; display: block; width: 100%; height: 100%;"><g class="style-scope iron-icon"><path d="M7 10l5 5 5-5z" class="style-scope iron-icon"></path></g></svg>
</iron-icon>
</div>
<div class="underline style-scope paper-input-container">
<div class="unfocused-line style-scope paper-input-container"></div>
<div class="focused-line style-scope paper-input-container"></div>
</div>
<div class="add-on-content style-scope paper-input-container">
</div>
</paper-input-container>
</paper-input>
</div>
</div>
<iron-dropdown id="dropdown" class="style-scope paper-menu-button" aria-disabled="false" aria-hidden="true" horizontal-align="right" vertical-align="top" style="outline: none; display: none;">
<div id="contentWrapper" class="style-scope iron-dropdown">
<div class="dropdown-content style-scope paper-menu-button" slot="dropdown-content">
<paper-listbox class="dropdown-content style-scope yt-options-renderer" slot="dropdown-content" role="listbox" aria-expanded="false" tabindex="0">
<paper-item class="style-scope yt-options-renderer iron-selected" role="option" tabindex="0" aria-disabled="false" aria-selected="true">
<yt-formatted-string class="style-scope yt-options-renderer">Choose one</yt-formatted-string>
</paper-item>
<paper-item class="style-scope yt-options-renderer" role="option" tabindex="-1" aria-disabled="false">
<yt-formatted-string class="style-scope yt-options-renderer">Promotes hatred or violence</yt-formatted-string>
</paper-item>
<paper-item class="style-scope yt-options-renderer" role="option" tabindex="-1" aria-disabled="false">
<yt-formatted-string class="style-scope yt-options-renderer">Abusing vulnerable individuals</yt-formatted-string>
</paper-item>
<paper-item class="style-scope yt-options-renderer" role="option" tabindex="-1" aria-disabled="false">
<yt-formatted-string class="style-scope yt-options-renderer">Bullying</yt-formatted-string>
</paper-item>
<paper-item class="style-scope yt-options-renderer" role="option" tabindex="-1" aria-disabled="false">
<yt-formatted-string class="style-scope yt-options-renderer">Abusive title or description</yt-formatted-string>
</paper-item>
<template is="dom-repeat" as="subOption" class="style-scope yt-options-renderer"></template>
</paper-listbox>
</div>
</div>
</iron-dropdown>
</paper-menu-button>
</paper-dropdown-menu>
//div[@id='trigger']
//div[@class='dropdown-trigger style-scope paper-dropdown-menu']
//paper-input-container[@class='style-scope paper-input']Don't know if this one is possible but I had to try it
I have tried with class or id attributes too but they are not clickable or maybe I'm doing something wrong. I would apreciate some help for this, thank you!

Reply