
| Key: |
WET-239
|
| Type: |
Bug
|
| Status: |
Closed
|
| Resolution: |
Fixed
|
| Priority: |
Major
|
| Assignee: |
Unassigned
|
| Reporter: |
Venugopal S Shenoy
|
| Votes: |
0
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
|
Original Estimate:
|
Unknown
|
Remaining Estimate:
|
Unknown
|
Time Spent:
|
Unknown
|
|
Issue Links:
|
Relationship
|
|
This issue Relates to:
|
|
WET-290
Properties of web pages should be esc...
|
|
|
|
|
|
|
|
Use the following HTML code and paste it in a HTML file (say "a.htm")
<HTML>
<HEAD>
<TITLE>
WET Test
</TITLE>
</HEAD>
<input id="CheckBox1" type="checkbox"/>
<label for="CheckBox1">Check'Box\<br />"Text"\n\n</label></td>
</HTML>
Open the html file (a.htm) in Internet Explorer.
Open the WET UI.
Navigate to the Menu Item "View" -> "Sync with Browser" -> "WET Test".
Open the Simulated Browser.
Right click on the check-box and in the menu popup, select "Full Definition View".
Right click on the check-box again and select the item "set" from the menu popup.
Observe the line (in fact two lines are inserted) that is inserted in the WET Editor.
Browser("title:=WET Test").Checkbox("label:=Check'Box\
"Text"\n\n").set()
The above line of scirpt will fail exeucution, since it is syntactically incorrect, with the following error message.
c.rb:5: parse error, unexpected tCONSTANT, expecting ')'
"Text"\n\n").set()
^
c.rb:5: parse error, unexpected ')', expecting $
"Text"\n\n").set()
Expected Behaviour:
The correct line should have been as given below:
Browser("title:=WET Test").Checkbox("label:=Check'Box\\\r\n\"Text\"\\n\\n").set
Executing the above line, will put a "check" mark in the check box, and thus runs successfully.
Note: The above line is obtained, through the Script Assistant Utility Ver 0.1. The validations related to return character, backslash (\) & double quote (") are taken care in the "BrowserPatrol.rb" file, in the "BuildProperty" function. Refer to that and make necessary changes in the present utilty also. The relevant script lines are given below.
propertyValue = propertyValue.gsub(/\\/, "\\\\\\")
propertyValue = propertyValue.gsub("\"", "\\\"")
propertyValue = propertyValue.gsub(/\r/, "\\r")
propertyValue = propertyValue.gsub(/\n/, "\\n")
|
|
Description
|
Use the following HTML code and paste it in a HTML file (say "a.htm")
<HTML>
<HEAD>
<TITLE>
WET Test
</TITLE>
</HEAD>
<input id="CheckBox1" type="checkbox"/>
<label for="CheckBox1">Check'Box\<br />"Text"\n\n</label></td>
</HTML>
Open the html file (a.htm) in Internet Explorer.
Open the WET UI.
Navigate to the Menu Item "View" -> "Sync with Browser" -> "WET Test".
Open the Simulated Browser.
Right click on the check-box and in the menu popup, select "Full Definition View".
Right click on the check-box again and select the item "set" from the menu popup.
Observe the line (in fact two lines are inserted) that is inserted in the WET Editor.
Browser("title:=WET Test").Checkbox("label:=Check'Box\
"Text"\n\n").set()
The above line of scirpt will fail exeucution, since it is syntactically incorrect, with the following error message.
c.rb:5: parse error, unexpected tCONSTANT, expecting ')'
"Text"\n\n").set()
^
c.rb:5: parse error, unexpected ')', expecting $
"Text"\n\n").set()
Expected Behaviour:
The correct line should have been as given below:
Browser("title:=WET Test").Checkbox("label:=Check'Box\\\r\n\"Text\"\\n\\n").set
Executing the above line, will put a "check" mark in the check box, and thus runs successfully.
Note: The above line is obtained, through the Script Assistant Utility Ver 0.1. The validations related to return character, backslash (\) & double quote (") are taken care in the "BrowserPatrol.rb" file, in the "BuildProperty" function. Refer to that and make necessary changes in the present utilty also. The relevant script lines are given below.
propertyValue = propertyValue.gsub(/\\/, "\\\\\\")
propertyValue = propertyValue.gsub("\"", "\\\"")
propertyValue = propertyValue.gsub(/\r/, "\\r")
propertyValue = propertyValue.gsub(/\n/, "\\n") |
Show » |
|