Tamm,
In Selenium webdriver I am not seeing any function to get the DOM of the current page. I googled and found there are lots of people asking similar/ same question but no answer.
I discussed with our developers regarding taking the page source/html source (other than DOM) but there is no gurantee that the source window and target window match the same layout.
Now i am thinking of 1 possible workaround for the current issue:
Current issue:
As par of regression testing,
1. do flb on the current page
2. //Now we are not able to enter input and go to the next levels.
Workaround:
As par of regression testing,
1. store the current page url
2. open a new tab with the current page url
3. do flb on the current page in the new tab (synchronous call to flb from test framework) and close new tab
4. After flb returns, proceed entering the input and submit in the actual tab (not on new tab)
5. repeat steps 1-4 for all regression test cases.
the problem with this workaround is the regression execution time will be more because flb is taking too much time to scan the page and regression waits till flb returns.
In case, if we are able to get DOM of the current page to rebuild the current page in later point of time, then regression time will be saved much. Alternately, we can have a DOM of the current page in a new window and call FLB asynchronously from regression f/w.
Please let me know your views on the workaround and any possibilities of getting DOM of the current page using any tool (not limiting to selenium).
Thanks
Madhusudan G