On Thursday 30 June 2005 06:16, David Kemp wrote:
> >To: [email protected]
> >From: CP Hennessy
> >Sent by: [EMAIL PROTECTED]
> >Date: 06/30/2005 02:38AM
> >Subject: [Selenium-users] checking the contentType of a window
> >
> >Hi,
> >One of my tests load a PDF. Currently I have a long wait where the
> >user
> >can verify that the PDF is present. However I'd like to also/instead
> >simply
> >verify that the content of the window is a PDF.
> >Using a DOM viewer it seems that there is a "document" object which I
> >should
> >be able to do a
> >verifyElementPresent | document | |
> >verifyAttribute | path=//[EMAIL PROTECTED] | |
> >
> >However I'm getting the error :
> >Element document not found.
>
> I had a go at this and found that the DOM view indicated a structure like
> this: //HTML/BODY/EMBED
>
> I tried the following and found it works:
> |open| somePdfUrl |
> |verifyAttribute| xpath=//embed/@src | somePdfUrl
>
> Is that any good to you?  Worked for me in IE and Firefox.  And if the pdf
> failed to load I got an element not found on the xpath, which is probably
> what you want.

Thanks David that worked perfectly.

CPH
_______________________________________________
Selenium-users mailing list
[email protected]
http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users

Reply via email to