User interface (UI) testing is a necessary process to evaluate whether the developed web applications meet the software requirements defined by the end-users. This study proposes an e-business workflow that automates UI testing utilizing Hidden Markov Models. The proposed workflow is designed to generate test scripts based on user browsing behaviors. In particular, it is able to generate browsing patterns that are unseen in the historical web usage data. To demonstrate the usability of the proposed testing framework, we provide a prototype implementation. Furthermore, to facilitate testing of the prototype implementation, we conduct experimental studies that investigate the quality of newly generated test scripts. In order to achieve this, we analyze the similarity between the actual browsing behaviors and the newly generated browsing behaviors. The results show that the proposed testing workflow is able to learn from the user-browsing behaviors extracted from the historical web usage log data. The results also show that the workflow is able to generate new and unseen user-browsing behaviors that have high similarities with the actual user-browsing behaviors. In turn, this indicates that the proposed system is able to generate high-quality new test scripts that can provide comprehensive testing of web applications.