Perl Selenium webdriver button click not working
<p>The script is able to click login button and that works.  After logging in, if there is another user logged in there is an option to force out the logged in user.</p>

<p>Here's the button...<br></p>

<pre><code>&lt;span id="Pages_DiagnosticsForceout_btnForceout" class="yui-button yui-push-button"&gt;
&lt;span class="first-child"&gt;
&lt;button type="button" tabindex="0"&gt;Force‌·Log‌·Out&lt;/button&gt;
&lt;/span&gt;
&lt;/span&gt;
</code></pre>

<p>Here is the attempted click... adding more info not entire script. </p>

<pre><code>#!/root/localperl/bin/perl5.22.0

use warnings;
use strict;

use Selenium::Firefox;
use Selenium::Firefox::Profile;
use Selenium::Remote::WDKeys;
use Selenium::Waiter;
use Data::Dumper;
use Time::Piece;
use Config;
use YAML;

my $ff;

logit("Attempting create profile ");

my $start = getTime();
my $profile;
my $profObject = wait_until { $profile = Selenium::Firefox::Profile-&gt;new; };

if ($profObject) {

    my $createProfile = wait_until { $profile-&gt;{profile_dir} = $ARGV[3]; };

    if ($createProfile) {
        logit("profile created, attempting browser start ");
    }
    else {
        logit("profile create failed");
        exit;
    }
}
else {
    logit("create profile object failed");
}

my $browser = wait_until {
    $ff = Selenium::Firefox-&gt;new(
        'default_finder'  =&gt; 'id',
        'firefox_profile' =&gt; $profile
    );
};

'''

my $forceOutButton = wait_until {
    $ff-&gt;find_element_by_xpath(".//*[\@id='Pages_DiagnosticsForceout_btnForceout']/span/button")-&gt;click();
};
</code></pre>

<p>Using firepath in firebug the xpath looks like it is selecting the button.  Yet the button is not clicked.  I set it up to never timeout so its not a timeout problem.  </p>