Need to create the reference of capabilities for mobile testing by selenium - selenium-webdriver

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.

Related

Is there a way to automate voice calls using Selenium Java

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.

Not able to search element for Desktop app with Selenium

I am automating the Desktop App which Microsoft based app. Application design is created with many custom view. I am trying to find the element with the tools like Inspect.exe,UISpy.exe. VisualUIAVerify but from all the 3 options I am not able to find the element. Using Inspect.exe I am getting the details but using that Selenium is not performing the actions.
Inspect.exe is showing like this :
And My Application UI is Like this:
I want to click on the Highlight Image. But I am not getting any identification for that.
If anyone can help me out with this then it would be gratefull.
With the help of the class name find all the elements and then use the indexing to click on the second element.
IList<WindowsElement> allElement = _driver.FindElementsByClassName("Image");

How to add a custom web page in Jenkins?

I am trying to make a web-page which displays the dynamic web page - basically it displays a table comprising of Name, IP_Address, and Group Name with used check/uncheck box. This webpage can run on a different tcp socket so it can be
https://myjenkins:5909 . Next, I want to add this table information in the mongo-db and read back the data and show on the web page - that table. What are the required steps for me? First is it possible? Here is my understanding that I have to write a back hand code using Jenkins plugin. Now, how to add the front end page like my custom page in Jenkins. Also, how database can be handled by the backhand Jenkins plugin? Sorry, I am new to these things. Any idea or details will help me. Also, is it possible to use LDAP based user id and password in my form.

How to read text from Captcha in selenium webdriver

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 :)

how to verify the tooltip in extjs application with selenium ide

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.

Resources