On screen text validation using selenium webdriver - java

I have test one web based application using selenium, which comes with some animation. That animation's conversation(cc text) will comes in a web element area.
Each on screen text time interval is different. Then how to verify this text using selenium web-driver.

Related

Return control to Selenium after executing an AutoIt script

I am writing Selenium scripts to test my webpage. To simulate testing, a desktop application resets the date in the DB (as the actual process is run after the date changes).
Now I am able to call my application and click the button through Selenium by Runtime.getRuntime().exec("E:\\AutoIT\\DBReset.exe");, but I am unable to return the control to Selenium after the reset is done.
When you perform the operation by AutoIt using:
Runtime.getRuntime().exec("E:\AutoIT\DBReset.exe");
Selenium still holds the focus to the web page. So once the Windows dialog box closes, Selenium should be able to execute the next line of code.
In case Selenium complains of lost focus you can use JavascriptExecutor to gain back browser focus :
Java :
((JavascriptExecutor) driver).executeScript("window.focus();");

Headless Selenium test which fills out a form?

We have a terminal application which serves webcontent via iFrames to our clients.
For some reason, it has been decided that we want to automate the test for this server side. I need to visit a page, fill out a form, and submit it - without actually rendering it in a GUI, I believe a headless selenium driver can do this - but I am new to selenium, does anyone have an example of how to do this in java with selenium?
You can use PhantomJS. Here you can find a working example.

Elements on Upper part of WebPages goes behind the screen or Disappear from Screen while running Selenium Tests

I am using Selenium web driver with Java in test automation framework of WebApplication which is portlet based using Java.My workflow is...
On Wizard Page-1: a container available having 2-3 input/edit boxes, some dropdown list(using Select class) and few buttons. That is like Wizard. After entering all required data on wizard of page-1. then click to Next button to navigate to Wizard Page-2.
On Wizard Page-2: First option is dropdown list where we use Select class i.e. selectByValue/selectByIndex etc.But during of after this action,application showed like scrolling up. But when we observed, actually it hides the first line of all webelements on Page-2.
I am sharing the screenshots for problem. Shared two images are, one is before action or real screen and second one is which hides few web element after the action.
image can be accessed: https://drive.google.com/open?id=0By2IDRpIvYf7SnphOVB4R1N3aTg

How to test the change in color of any hyper link after clicking the link by using selenium

When I click on a link on a web page, the color of the hyper link gets changed. How can I test this feature by using selenium web driver.
As far as I know, you can't.
The 'state' (visited or not) of a link is set by the browser. Depending of the 'state' the link appears in one colour or in another. CSS can override the colour used by the browser but not the 'state'. This is not something Selenium can give you access.
Moreover, I agree with sircapsalot, it is a waste of time as you will test if the web browser do its job and not the web page itself.

Selenium IDE does not change PrimeFaces control

we have a web form developed by Java and PrimeFaces framework. In this form we have a ui control which is called slider. It contanins a button on a horizontal line. When we move the button it gives us a number in [50,99] range.
The problem is when i use Selenium IDE to record test cases, Selenium is not able to move the slider control. How can i achieve this?
Here is what my slider looks like:

Categories

Resources