0

i am trying to place text in a textbox using jwebunit and i keep getting a "Exception invoking setOuterHTML" error. this is the code that i think is causing the issue

tester.setTextField("ctl00$ctl00$ContentMain$ContentPlaceHolder1$ucCreateEditCustomer$ucBillingAddressForm$tbFirstName", Database1[0][0]);

because the exception is caused by

java.lang.AssertionError: Did not find form element with name  
["ctl00$ctl00$ContentMain$ContentPlaceHolder1$ucCreateEditCustomer$ucBillingAddressForm$tbFirstName"].

i got that element name that i am using from the website i am trying to enter information into. the code for the textfeild is

<input name="ctl00$ctl00$ContentMain$ContentPlaceHolder1$ucCreateEditCustomer$ucShippingAddressForm$tbFirstName"  
type="text"  
id="ctl00_ctl00_ContentMain_ContentPlaceHolder1_ucCreateEditCustomer_ucShippingAddressForm_tbFirstName"  
class="AddressFormTextBox" />

does anyone know why i might be getting this error? Jwebunit easly connects to google and this website but it cant fillout any of the textboxes. any help would be appreciated thanks.

random09
  • 31
  • 2

1 Answers1

0

I think that:

name="(..)$ucCreateEditCustomer$ucShippingAddressForm$tbFirstName"

(...)$ucCreateEditCustomer$ucBillingAddressForm$tbFirstName"

may be the cause of the issue.

Community
  • 1
  • 1
Kuba Rakoczy
  • 3,954
  • 2
  • 15
  • 16
  • Sorry the webpage has 2 boxes one with $ucShipping and one with $ucBilling besides that their name is the same and they both can't be found but thanks for catching that mistake – random09 Dec 14 '14 at 14:17
  • so i just noticed something the "$" means it is a php variable. does anyone know how to get the value of a php variable using JWebUnit or a similar java library? – random09 Dec 16 '14 at 20:51