December 2015
Intermediate to advanced
192 pages
3h
English
CHAPTER 21
![]()
Optimization
Working test scripts are just the first test step to successful test automation, as automated tests are executed often, and we all know the application changes frequently, too. Therefore, it is important that our test scripts be
In this chapter, I show some examples to optimize test scripts.
Assert string in page_source is faster than the text
To verify a piece of text on a web page, frequently for assertion, we can use driver.PageSource or driver.FindElement(By.TagName("body")).Text. Besides the obvious different output, there are major performance differences, too. To get a text view (for a whole ...
Read now
Unlock full access