Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

In Selenium IDE, I need to call the command assertValue of an input field on data coming from a table <td> (which only allows storeText, not storeValue) from a different page.

Right now the data is being stored correctly, but I think the assertValue command requires a value variable, not a text variable. I found out from past situations that these are different things to the IDE.

I tried the following, but it didn't work:

Store text variable from table <td> tag:

Command: storeText
Target: //table[@id='AddressList_List_ListGrid']/tbody/tr[2]/td[5]
Value: var_source_client_billing_address_city

Store text variable into value variable:

Command: storeValue
Target: ${var_source_client_billing_address_city)
Value: var_source_client_billing_address_city_value

Crashes on command above, so I can't even use the value variable to assert the value

Assert value variable in text input field:

Command: assertValue
Target: id=AddressEditor_TxtCity
Value: ${var_source_client_billing_address_city_value}

This also did not work:

Store text variable from table <td> tag:

Command: storeText
Target: //table[@id='AddressList_List_ListGrid']/tbody/tr[2]/td[5]
Value: var_source_client_billing_address_city

Assert value variable in text input field:

Command: assertValue
Target: id=AddressEditor_TxtCity
Value: ${var_source_client_billing_address_city}
share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

I got the first set to work, but for comparing the text variable (created with storeText) and the value variable (created with storeValue), I just used assertExpression.

Store text variable from table td tag inner HTML

Command: storeText
Target: //table[@id='AddressList_List_ListGrid']/tbody/tr[2]/td[5]
Value: var_source_client_billing_address_city

Store text variable into value variable

Command: storeValue
Target: ${var_source_client_billing_address_city)
Value: var_source_client_billing_address_city_value

Assert value variable in text input field to text value from td inner HTML

Command: assertExpression
Target: ${var_source_client_billing_address_city}
Value: ${var_source_client_billing_address_city_value}
share|improve this answer
add comment

Your Answer

 
discard

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.