Hi I am having Captcha like 3+1= along with text boxes. I have to read the int values and enter the result in textboxes using SendKeys. I am able to capture the whole Capture image but I want to separate the each texts to add the numbers. How is it possible??
Can anyone please tell me??
Captcha meant for avoiding automated form submissions, if you are testing for the site, you can have a setting in the quality testing server to serve a specific captcha and use sendkey to send back
Selenium Webdriver is not supporting captcha.
While captcha is existing for the same reason so no one can use robot on the website.
You have to ask team to provide you special environment where they bypass the captcha functionality or ask your development team to expose the captcha values on DOM also so you can retrieve the value and then perform actions accordingly
Hope it will help you :)
Related
Is there a way to automate voice calls using Selenium Java
I have a requirement where , i need to click the call button available in my website and provide the inputs and get the responses based on the input.
Is there any way we can achieve this using selenium
Can you add some additional details to understand the problem.
If you are talking about IVR Testing I don't think you can achieve it using Selenium and Java.
For IVR Testing you can use tools like CYARA or HAMMER, you can find the details in below link.
https://www.softwaretestinghelp.com/ivr-testing-tools/
If the scenario is upon click call button if you get popup or window opens.
Where you need to provide details, It can be done by switching to popup/window using switchTo() and send the input using sendKeys(),
If you want to test the output which is a call/voice it can't be done.
I just started mobile automation using selenium and appium. I need to create a object which directly enter the value in textbox. Currently first it is launching the app then I am able to reach on the perticular textbox . I do not want to launch the app again and again I just want to enter the information in textbox,dropdown etc.. Please help me to write the program...
You can get textbox by id using uiautomatorviewer if it's android or by xpath if it's on webbrowser, then you can use
driver.findElement(By.id("id here as string of textbox")).sendKeys("what you want to send");
at the end you can confirm by clicking accept or something using
driver.findElement(By.id("id of accept button")).click();
keep in mind that if you use id you must use By.id, xpath then By.xpath and so on.
I want to use selenium/webdriver to simulate a browser and scrape some website-content with it. Even if its not the fastest method, for me it has many advantages such as executing scripts etc.
For many websites it is forbidden to access them via an automated method, for example search engines like google or bing.
For one tool i need to scrape the estimated resultstat from google for several keywords. This will look like the following: simulate the browser that visits google.com and types in a keyword and scrapes the results, then after a little pause type in the next keyword, scrape the results and so on...
My question is: Is it possible for a website to recognize that I'm using selenium to simulate the browser instead of using the browser by hand? Especially the google case gives me some doubts. I know selenium is partly developed by google or at least by some guys working for google. So does leave selenium some fingerprints or isn't it possible to decide if I'm using the browser by myself or simulated by selenium, even for google?
No, nobody can actually see that you're using Selenium and not hand-operating the browser yourself with WebDriver. I'm not sure about the old Selenium RC, but it should be the same way. Here's how it works:
Selenium opens up a browser with a clean profile (or with a profile you selected)
Selenium is hooked up to the browser so it can steer it, control it. But the browser still does most of the work. Basically, Selenium replaces the user inputs to the browser, but not more.
You can easily verify this by reading the contents of the HTTP headers sent by your browser.
If you ever actually needed Selenium to be recognized by your server, you can use Browsermob-proxy and add a custom header to your requests.
All that said, there is one thing you must be aware of. While there's no way to detect Selenium directly, there can be some indirect clues picked up by the website you're visiting. Those usually include scanning for too many requests made in virtually no time - this might be an issue for you. Make sure your Selenium is behaving like a user.
EDIT 2016/04:
Apparanetly it is possible as https://stackoverflow.com/a/33403473/2930045 states that a company can do it. My guess - and it is nothing but a guess - is that they can run some JS that Selenium installs into the browser to operate.
Signs point to yes, sites are able to regonize that you are using Selenium.
Counter Example: www.stubhub.com detects and blocks my browser instance launched using Selenium while "normal" browsing done manually (not using the browser launched by the Selenium web driver) work with out issue.
See this stackoverflow question for additional details
Can a website detect when you are using selenium with chromedriver?
I am looking for some initial direction on this one because I cannot seem to find my way with it. Let me explain...
I am developing a website wherein a logged in site member (Joomla 1.6) can fill out a simple form and attach a pdf to be uploaded upon submission. The user then clicks the submit button and the page will refresh to a new and unique web page.
User Submits data on http://www.examplesite.com and then after submission a new web page is generated that is called http://www.examplesite.com/userSubmittedValue
This newly generated web page would come from a template that is specified by the administrator and, most important, it will display all of the information that the user submitted. Also, there would be a link to download the pdf they uploaded. The user could then view a list of all the pages they have created in this manner via their profile.
I have seen this all over, but I am at a loss for how to generate this. Any help is much appreciated.
This is not something you will be able to easily do or get a detailed answer for here. If you just wanted to do the submission form with a thank you page that shows the data submitted you could use any number of form wizard type extensions - http://extensions.joomla.org/extensions/contacts-and-feedback/forms
If you just needed a way for users to upload PDfs and have access to them you could use one of the file management extensions that offer front end upload features - http://extensions.joomla.org/extensions/directory-a-documentation/downloads
If the additional data that is being submitted is simply data related to the file - title, description, etc then one of the file download components should work fine for you. The choices are limited in 1.6 at this time though so you might have to go with 1.5 to get the extension that works best for your needs.
So this probably isn't the best way to do it if your using Joomla but it just might help.
I would use PHP and inside of you're directory have a file like "template.html". Then I would create some php to handle the task of....
Opening "template.html"
Finding and replacing the values that the user passed you
Save the "template.html" under a new name (userSubmittedValue.html)
Again, I never really use Joomla. If you were to try this I'd suggest checking out php's file system functions (http://us2.php.net/manual/en/ref.filesystem.php).
Hope this helps a bit.
I learning automation of application with selenium ide.The application which I am currently testing is a extjs application.In this application all the required validations are shown in the tooltip.For ex: I have password form in which new password and confirm password are the two fields and there is a submit button.If the password entered in the new and confirm password field do not match then "Password do not match" message is shown in the tooltip and the submit button is disabled.In this case how to verify the tooltip and its contents in the selenium.
Plz can anyone suggest some solution to the above problem?All validation in my application are shown in the tooltip.
thanks,
sushi
First, make sure that you explicitly assign ids to your fields. Otherwise, it will be very hard to get a hold of the components with the automatically generated ids (like "ext-comp-004").
The strategy is to use the verifyEval Selenium command and use the Ext JS API to do certain things.
For checking the active error message of a field with id "password_confirm", you can use:
Ext.getCmp("password_confirm").getActiveError();
First, try this in the Firebug console manually to make sure it works for you. Then you can do the same in your Selenium script as:
Command: verifyEval
Script: Ext.getCmp("password_confirm").getActiveError()
Expected: Passwords do not match
If you want to test this out with Selenium IDE in Firefox first, you should take into account that the window object will be wrapped in a XPCNativeWrapper. You can access the actual window object and the Ext JS namespace in it through wrappedJSObject:
Command: verifyEval
Script: window.wrappedJSObject.Ext.getCmp("password_confirm").getActiveError()
Expected: Passwords do not match
For some general tips on testing Ext JS applications with Selenium, see this answer. Some parts of it may be outdated, but can still give you an idea about the general strategies involved.