Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Change data in a field
#1
I have a bunch of web pages that have a number of text boxes I need to change. There are 2 problems though.
1 - the number of boxes changes on each
2 - the name of each text box changes.

If these two were the same all the time I would simply do the following for each box:
Htm el=htm("INPUT" "ctlAnswerStartDate_10211_txtMonth" "" "Internet Explorer" "2/3" 20 0x121)
el.SetText("07")

Is there a way to solve my problem with the two given unknowns?

TIA,

Carl
#2
I need an example to imagine it correctly.
#3
To simplify the problem, lets say the following is a web page:

state: [_CA__] {field called txt_nx1}
age: [__23___] {field called txt_nx2}

the next time I go to the web page with data it looks like this:

state: [_AZ__] {field called txt_nx3}
age: [__12___] {field called txt_nx4}
height: [___3'6"___] {field called txt_nx5}

I would like to be able to set text on these fields. Normally this would be easy, but the names change as does the number of fields.

Thanks!
#4
Label at left does not change? Then capture label, and enter 1 or some other number in Navigate field so that Test would find the edit field, not the label.

This is example with http://www.google.com/advanced_search

Code:
Copy      Help
Htm el=htm("FONT" "with all of the words" "" "Google Advanced Search - Microsoft Internet Explorer" 0 4 0x21 0 3)
el.SetText("a")
el=htm("FONT" "with the exact phrase" "" "Google Advanced Search - Microsoft Internet Explorer" 0 6 0x21 0 3)
el.SetText("b")
el=htm("FONT" "-- missing --" "" "Google Advanced Search - Microsoft Internet Explorer" 0 7 0x21 0 3)
el.SetText("c")
err+


Forum Jump:


Users browsing this thread: 1 Guest(s)