Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A link on page 1 opens a new page "receipt page". It contains only text values. I need to assert or verify values on the receipt page to ensure that this is the correct receipt.

After executing the line

driver.find_element_by_link_text("Print Order!").click() #this what navigates the receipt page 

the following tags are returned and must be validated:

<div style="border-bottom:1px dashed black;">
<span>Receipt No: 197</span>
<span style="font-size:smaller;font-weight:lighter;margin-left:130px;">16/10/2012 -04:10 pm </span>
<span>Customer Name: 123</span>
<span>Cashier Name: engy</span>
<table width="100%" style="font-size:smaller; border-bottom:1px dotted black;text-align:center;">
<span>Total Cost: 5700</span>
share|improve this question
I think I understand the problem you are trying to solve, but what is your question? – user246 Oct 16 '12 at 15:45
now i succeeded to make a test case that do some actions and the last action is to generate a receipt page to be printed. my question is i need to verify text on that page to ensure that it's the correct receipt – engy Oct 17 '12 at 11:51
What is preventing you from doing this? You don't mention any blocking issues, or give a description of what sort of failure is occurring. Are you asking what should you verify on the receipt page, or how to do it? – Sam Woods Oct 17 '12 at 15:38
no, i'm asking what code to write to verify a text on a page with "about:blank" URL how to make selenium webdriver point to that new page. – engy Oct 18 '12 at 11:03

In C# the code would be:


This will switch to the newly opened window and then you would treat it just like any other page. To switch back would be:


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.