In this chapter, we will cover:
Unlike desktop (client) applications, the Web poses specific challenges that go beyond the local machine. For instance, a web page may not display the intended content correctly with regard to content, format, layout, and even functionality, due to missing or corrupted resources located on a remote server. An application server, a database server, a Cascading Style Sheet (CSS), and a configuration or JavaScript file (.js
) are among the resources that may have an impact on the web application functioning. Other challenges include the integrity of the links, JavaScript bugs, and caching effects, to name a few. Security issues may also prevent web pages from displaying contents properly, as is the case with images loaded across domains.
Automating tests for the GUI of a web page poses challenges related to script page synchronization, object identification, and checking dynamic content, among others. This chapter describes various common automation tasks related to the testing of web pages.
This chapter is not intended to be a tutorial on web technology, so some basic background is required, for instance, being acquainted with basic concepts such as Document Object Model (DOM). To learn about DOM, it is recommended that you refer to the official specification at http://www.w3.org/TR/DOM-Level-3-Core/introduction.html.