Hi Dierk,

Thanks for your answer. I changed 
<setInputField name="announceVisitor$LastNameTextBox" value="test"/>
 to look for the xpath instead of a name.
<setInputField 
xpath="/html/body/form/table[1]/tbody/tr[2]/td/div/div/div[7]/div[2]/input" 
value="test"/>

And got the following error when running the test:
JavaScript error loading page 
http://localhost/MyApp/Forms/BasicSkeleton.aspx?Nav=AnnounceVisitor: 
ReferenceError: "setDirtyFlag" is not defined. 
(http://localhost/MyApp/WebResource.axd?d=TOfd_1-gVLRQjmbzWZrneamEPWVy54M1lbCohmtTHfx4bqjXfRrZaY3Pl_DTIFG-iyzNXQX9v89JfpuM4zvPhRLI4b87D4l0YxjR9RntSpU1&t=635418570520000000#90(Function)#1)

Does this have something to do with the WebTest script or with our application?

Best Regards,
Nicholas

-----Original Message-----
From: Dierk König [mailto:[email protected]] 
Sent: vrijdag 3 april 2015 22:53
To: [email protected]; Nicholas Lievens
Subject: Re: [Webtest] Form fields

It could be that you need a setInputField with and xpath attribute - in case 
that your form is somehow generated via JavaScript.
http://webtest.canoo.com/webtest/manual/setInputField.html

cheers
Dierk

> Am 03.04.2015 um 14:34 schrieb Nicholas Lievens <[email protected]>:
> 
> Hi all,
> 
>  
> 
> I’m new to testing with WebTest. I’m trying to fill in some values on a form 
> that is within a frame (e.g. announceVisitor$LastNameTextBox) . When 
> executing the test it picks up the frame as it should but the test fails.  
> The reason for this I think is the fact that the contents of the form are not 
> loaded (only the frame is). When I open the Error Page in the report I see 
> the frame but it should contain the form and its contents (input fields) but 
> it doesn’t. Does anyone have
> 
>  
> 
> My test looks like  the following:
> 
>  
> 
>  
> 
> <?xml version="1.0"?>
> 
>  
> 
> <!DOCTYPE project SYSTEM "../dtd/Project.dtd">
> 
>  
> 
> <project default="test">
> 
>                 <target name="test">
> 
>                                <webtest name="Login to MyApp">
> 
>                                                <invoke 
> url="http://myurl.test"/>
> 
>                                                <setInputField name="Username" 
> value="999"/>
> 
>                                                <setInputField 
> description="Set password field Password: 999" name="Password" value="999"/>
> 
>                                                <clickButton label="Login"/>
> 
>                                                <followFrame name="contents"/>
> 
>                                                <clickElement 
> xpath="//td[text()='Cell']"/>
> 
>                                                <clickLink label="MyLink"/>
> 
>                                                <followFrame name="main"/>
> 
>                                                <selectForm name="WebForm1"/>
> 
>                                                <setSelectField 
> htmlId="hostEmployeeSelect" value="User, Test"/>
> 
>                                                <setInputField 
> name="announceVisitor$LastNameTextBox" value="test"/>
> 
>                                                <setInputField 
> name="announceVisitor$FirstNameTextBox" value="test"/>
> 
>                                                <setInputField 
> name="announceVisitor$EmailTextBox" value="[email protected]"/>
> 
>                                                <setInputField 
> name="announceVisitor$PlateNumberTextBox" value="test"/>
> 
>                                                <clickButton id="okButton"/>
> 
>                                </webtest>
> 
>                 </target>
> 
> </project>
> 
>  
> 
>  
> 
> Best Regards,
> 
> Nicholas                             
> 
> -------------------------------------
> 
> Dit e-mailbericht en alle documenten die ermee verzonden worden, zijn 
> vertrouwelijk en uitsluitend bestemd voor gebruik door de persoon of de 
> onderneming waaraan ze geadresseerd zijn.  Indien deze e-mail verkeerdelijk 
> bij u terechtkomt, gelieve de afzender te verwittigen en deze bestanden van 
> uw computer te verwijderen.
> 
> Ce message e-mail ainsi que tous les fichiers transmis sont confidentiels et 
> uniquement destinés à l'usage de la personne ou de l'entité à qui ils sont 
> adressés.  Si vous avez reçu ce message e-mail par erreur, veuillez en 
> informer l'expéditeur et le supprimer de tout ordinateur.
> 
> This e-mail and any files transmitted with it are confidential and intended 
> solely for the use of the individual or entity to whom they are addressed.  
> If you have received this e-mail in error please notify the sender and delete 
> the material from any computer.
> 
> Diese E-mail und alle mit ihr gesendeten Dateien sind vertraulich und sind 
> nur für den Empfänger und nicht für kommerzielle Zwecke zugelassen. Falls Sie 
> diese E-mail unberechtigterweise erhalten haben, informieren Sie bitte den 
> Absender und löschen Sie alle hier relevanten Dateien.
> 
> -------------------------------------
> 

-------------------------------------

Dit e-mailbericht en alle documenten die ermee verzonden worden, zijn 
vertrouwelijk en uitsluitend bestemd voor gebruik door de persoon of de 
onderneming waaraan ze geadresseerd zijn.  Indien deze e-mail verkeerdelijk bij 
u terechtkomt, gelieve de afzender te verwittigen en deze bestanden van uw 
computer te verwijderen.

Ce message e-mail ainsi que tous les fichiers transmis sont confidentiels et 
uniquement destinés à l'usage de la personne ou de l'entité à qui ils sont 
adressés.  Si vous avez reçu ce message e-mail par erreur, veuillez en informer 
l'expéditeur et le supprimer de tout ordinateur.

This e-mail and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed.  If 
you have received this e-mail in error please notify the sender and delete the 
material from any computer.

Diese E-mail und alle mit ihr gesendeten Dateien sind vertraulich und sind nur 
für den Empfänger und nicht für kommerzielle Zwecke zugelassen. Falls Sie diese 
E-mail unberechtigterweise erhalten haben, informieren Sie bitte den Absender 
und löschen Sie alle hier relevanten Dateien.

-------------------------------------

Reply via email to