Web driver is a library which will allow the user to interact with the browser. Tester always thinks, it's a tool will qualify to automate entire component of web applications.
In general,web driver doesn’t have any libraries to automate all components of web applications.
Common problems in test automation:
Common problems in test automation:
- Windows objects like save,download,import,export dialog boxes.
- Switching between windows
- Web driver doesn’t automate Flash, silver light and charts.
- Handling Popup/Dialog Windows
- Handling Hidden objects
- Triggering event after setting values.
- Object Repository or Page object model support.
Handling hidden object and triggering event after setting values.
If you are not able to click hidden element on page, then write java script to click the element in browser. I have faced similar issue in my project, after setting value in text box , its not triggering event. Due to that, test were randomly getting failed in CI. When test run in foreground then its getting passed or else failed.
I have tried to solve this problem in many ways , using tab keys ,enter keys but nothing worked out. Finally rewritten script in java script to focus out the element after setting values. To click any Hidden element or event trigger , don’t depend on web driver library better write in java script.
To click Hidden object
JavascriptExecutor js = (JavascriptExecutor)driver;
js.executeScript("arguments[0].click();", element);
Trigger event.
page.execute_script("$('table.list_price').focusout()”)
Windows objects like save,download,import,export dialog boxes
If you are developing and running scripts in windows, then use VBscript ,WSH and Autoit to handle dialog boxes in windows platform. For manipulating excel and handling text files, use VBscript handles.
Switching between windows
Find details in my previous post: http://automationhints.blogspot.in/2012/05/how-to-identify-popup-window-in.html
Web driver doesn’t automate Flash, silver light and charts.
https://code.google.com/p/wipflash/ : Flash based applications
http://teststack.net/White/ : silver light
UI Automation : For all .net based applications
Image comparison : http://www.imagemagick.org/
Object Repository or Page object model support.
Java based Framework : PageFactory
Ruby on rails : siteprism, capypage.