[image][1]
The button present in the frame, i have written code for switch the frame and click on the facebook button but the click operation is not performed, give s my html code please help me out
Html frame
<document>
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<body id="social_login" class="plugin">
<!--[if IE]><div id="ie"><![endif]-->
<div id="social_login_frame" class="frame">
<div id="content">
<div id="providers" class="providers providers_unpaginated">
<div id="providers_group_1" class="providers_group">
<div class="providers_block" role="application">
<div class="providers_row">
<div id="provider_facebook" class="provider">
<a id="button_facebook" class="button" href="#" rel="nofollow" title="Login with Facebook" role="button" aria-label="Login with Facebook" aria-haspopup="true">
<div id="name_facebook" class="name">Facebook</div>
</div>
<div id="provider_google" class="provider">
<div id="provider_linkedin" class="provider">
</div>
</div>
</div>
</div>
</div>
[1]: https://i.stack.imgur.com/jXMDe.png
Webdriver code
driver.findElement(By.xpath("//*[@id='contentagent']/div[2]/ul/li[2]/a")).click();
Thread.sleep(1000);
driver.switchTo().frame(0);
Thread.sleep(500);
driver.findElement(By.id("button_facebook")).click();