History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: WET-217
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Unassigned
Reporter: Shreenidhi Nidugala
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
WET

When a xml RPC fails, it doesnot retry.

Created: 09/Sep/06 06:57 AM   Updated: 02/Apr/07 10:50 PM
Component/s: Script Assistant
Affects Version/s: 0.9.8 Final
Fix Version/s: 1.0.0, 0.9.8_Patch


 Description  « Hide
When I was generating the scripts for a Text field object, for the clear method, the Assistant didnot repsond to me properly.

The scenario was like this:
I had a text field that contained some text in it initially.
I used the clear() method for clearing the text area.
But when the script got generated and the browser window was refreshed, the text area was not cleared.
For the next refresh, the field had got cleared.
When looked into the logs it showed me that the RPC had failed once for that part and it didnot retry.

The snippet of the log is provided below:
----------------------------------------------------------------------------------------------------------------
2006-09-09 12:32:00,843 DEBUG FunctionDialog:1: - FunctionDialog()|Trying to execute Browser('title:=Controls').TextField('name:=NoLabelTxt').clear()
2006-09-09 12:32:00,843 DEBUG WetRunner:4: - ExecuteCmd()|Trying to execute command => Browser('title:=Controls').TextField('name:=NoLabelTxt').clear())
2006-09-09 12:32:00,859 ERROR WetRunner:4: - ExecuteCmd()|Error while trying to execute => Script_assistant.WetExecutionDetails => System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to write data to the transport connection: An established connection was aborted by the software in your host machine. ---> System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine
at System.Net.Sockets.Socket.MultipleSend(BufferOffsetSize[] buffers, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.MultipleWrite(BufferOffsetSize[] buffers)
— End of inner exception stack trace —
at System.Net.Sockets.NetworkStream.MultipleWrite(BufferOffsetSize[] buffers)
at System.Net.Connection.Write(ScatterGatherBuffers writeBuffer)
at System.Net.ConnectStream.ResubmitWrite(ConnectStream oldStream, Boolean suppressWrite)
— End of inner exception stack trace —
at System.Net.HttpWebRequest.GetResponse()
at CookComputing.XmlRpc.XmlRpcClientProtocol.GetWebResponse(WebRequest request)
at CookComputing.XmlRpc.XmlRpcClientProtocol.Invoke(Object clientObj, MethodInfo mi, Object[] parameters)
at CookComputing.XmlRpc.XmlRpcClientProtocol.Invoke(MethodInfo mi, Object[] Parameters)
at XmlRpcProxy7406691f-17d3-498d-b535-d15fb5ea213a.ExecuteCommand(String )
at Script_assistant.WetRunner.DoExecute(WetExecutionDetails& wd) in C:\svn_wet\main\openqa\src\WetRunner.cs:line 147
2006-09-09 12:32:01,671 DEBUG WetRunner:4: - ExecuteCmd()|Starting to get browser dom in parts for browser(handle=262662)
2006-09-09 12:32:03,781 DEBUG DomWrapperS:4: - AddElement()|Adding Browser(Browser("title:=Controls")); uid = 262662
2006-09-09 12:32:03,781 DEBUG DomWrapperS:4: - AddElement()|Adding TextField(Browser("title:=Controls").TextField("label:=Textfield with label")); uid = 262662_11
2006-09-09 12:32:03,781 DEBUG DomWrapperS:4: - AddElement()|Adding TextField(Browser("title:=Controls").TextField("name:=NoLabelTxt")); uid = 262662_12
2006-09-09 12:32:03,781 DEBUG DomWrapperS:4: - AddElement()|Adding TextField(Browser("title:=Controls").TextField("name:=NoLabelTxt", "label:=Textfield with label")); uid = 262662_15
2006-09-09 12:32:03,781 DEBUG DomWrapperS:4: - AddElement()|Adding
----------------------------------------------------------------------------------------------------------------



 All   Comments   Change History      Sort Order:
Raghu Venkataramana - 17/Sep/06 12:47 PM
Amith ran into this issue recently and as a result the script generated did not match the actual operation.
For example:
1) Using the simualted browser set a textfield

Expect:
1) Actual textfield on the remote browser gets 'set'
2) Script corresponding to this is generated.

Actual
Only step (2) above was performed. This means that we potentially have a buggy script.

To counter:
Try the operation a few times (say 3). and only after success, go ahead and update the script. If operation should fail for 3 times then - dont update the script either but give an error message box to the user stating that the XML Rpc seems to have problems. The user should try to restart the XML Rpc and check.


Raghu Venkataramana - 17/Sep/06 03:54 PM
I have implemented a retry mechanism. I dont know how we can write unit tests, but definitely the build must go through some amount of retesting - for the 'add function area' atleast.

Raghu Venkataramana - 29/Sep/06 04:47 PM
See previous comment

Raghu Venkataramana - 04/Oct/06 04:42 AM
The fix was only put for Execute command - This also needs to be implemented for:

1) StartBrowser
2) GetBrowserDomElementsInParts - Is this needed - Since browser dom is fetched in parts, we can end up with a lot of other related issues.


Raghu Venkataramana - 04/Oct/06 02:11 PM
Fixed in R217.

All the methods mentioned in the comment have been fixed.

To get a build with the fix you need to get the patch titled 20041004 and follow the instructions. The patches are available at http://openqa.org/wet/patch.html


Raghu Venkataramana - 02/Apr/07 10:50 PM
Closing as there is no easy way to verify. Reopen if the issue still exists.