Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» how to connect DB in selenium webriver
Fri Oct 06, 2017 4:09 pm by anbarasi

» How find any text in browser screen and click on it?
Thu Oct 05, 2017 2:02 pm by sandeepkommineni

» Selenium Webdriver
Tue Oct 03, 2017 1:35 pm by PiyushBiswas

» GRID setup tutorial.
Wed Sep 27, 2017 4:29 pm by johnyapp

» Drag & Drop Between Windows Using Selenium Driver
Wed Sep 27, 2017 2:10 pm by 26rondel

» Check if window is closed / verify input
Sat Sep 23, 2017 10:21 pm by brainstir

» How to work on pages with AJAX in selenium?
Mon Sep 18, 2017 6:08 pm by azharuddin

» pause test until user press a key like F2
Wed Aug 09, 2017 11:10 pm by djnforce

» Selecting the input for auto populating element
Sat Jul 29, 2017 7:53 pm by kdabbara

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Login to twitter account

View previous topic View next topic Go down

Login to twitter account

Post by HemaPen on Thu Jun 20, 2013 6:21 pm

hi, 

I have started my automation project since 2 days. I need to login to twitter account and verify or click on feedpost.
While I am trying to login to twitter, it is taking me to "We gotta check are you human?" page. Since this page
includes image and text to be input for verification, I dont know how to solve this.
Has anyone faced this problem? How can I avoid this authentication.

This doesnt happen when I login to facebook account.

If anyone has information, please reply as I am stuck at this point.

Thanks,

HemaPen

Posts : 7
Join date : 2013-06-20

Back to top Go down

Re: Login to twitter account

Post by lkavitha on Sat Jun 22, 2013 3:57 am

There is a article related to your question, the author has tried rewriting the expected captcha hidden value using javascript, and then did a sendKey to set the actual value (as done by user usually). Something similar should be possible as the twitter site also has a "recaptcha_challenge_field" that stores a hidden value and i am anticipating it to contain the expected value. Yet to try, when time permits

To reach the article do a google for "Automating(Breaking) captcha using Selenium Webdriver", click on the first link.

lkavitha

Posts : 1
Join date : 2013-06-22

Back to top Go down

Twitter Login Script

Post by sree.cs10@gmail.com on Sat Jun 22, 2013 10:08 pm

Hi HemaPen,

I am able to login to Twitter account successfully without taking me to Captcha page. Can you pls try the below code, and let me know if you face any issues.. 

***************
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.By;

public class LoginToTwitter {
public static void main(String[] args) throws Exception {
WebDriver fd=new FirefoxDriver();
fd.get("https://twitter.com");
fd.findElement(By.xpath("/html/body/div/div[2]/div/div/div[3]/div[2]/form/div/label"))
.sendKeys("twitter-userid");
fd.findElement(By.xpath("/html/body/div/div[2]/div/div/div[3]/div[2]/form/table/tbody/tr/td/div/label"))
.sendKeys("twitter-pwd");
fd.findElement(By.xpath("/html/body/div/div[2]/div/div/div[3]/div[2]/form/table/tbody/tr/td[2]/button")).click();
}
}
***************

sree.cs10@gmail.com

Posts : 3
Join date : 2013-06-10
Age : 28
Location : Hyderabad

Back to top Go down

Re: Login to twitter account

Post by HemaPen on Mon Jun 24, 2013 10:57 am

Hi Sree and Kavitha,


Thank you for your reply.

I am using chrome driver and By.id(). Ideally none of this should matter. 
But still I could not login without captcha screen popping up.

However, when I tried with WebdriverBackedSlenium, I could login successfully without getting captcha screen.

I will have to look at breaking captcha and learn to break if in case I run into captcha anytime.

Thanks again for your reply,
Hema

HemaPen

Posts : 7
Join date : 2013-06-20

Back to top Go down

Re: Login to twitter account

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum