Tuesday, 24 January 2012

How to automate Omniture Debugger. Omniture Debugger Page Object.

That is quite a task from the first point of view, taking into consideration that the debugger itself is javascript based. In addition the task gets a condition, when you know that the Omniture Debugger page actually does not stop loading at FireFox - it transfers data from some omniture host, so, please be the following solution works for IE only. Though, after all, I do not really care, because I do not tests omniture, I test properties are accessed by debugger
Let's review what do we have:
  • javascript that actually calls omniture debugger page. Normally you use it as a bookmark.
  • some page that is considered as a referrer to Omniture Debugger page
What we need to have at the end:
  • open Omniture Debugger page in a popup and switch to it
  • ensure that variable or property we are searching for exists on the page and has the appropriate value

First let's divide omniture's code on two parts:
  1. open popup window
  2. call Omniture Debugger page
Then step 1 will look like just a method, considering this.driver as the webdriver instance

And the second is the Omniture Debugger page object itself:

when it comes to check variables you can use ensureVariableExists() method - it seems to be universal
hope you enjoyed ;)


No comments:

Post a Comment