Hi Telerik/All,
I have a situation where I need to automate test in which automation test should searches for a value in the list box and if value is present in the list box then it needs to highlight it. I have developed a customize code which is as follows:
pages.BORWL08D63186Wmservice.SilverlightApp.LstProcessOrdersListbox.Find.ByTextContent(Data("Process Order").ToString()).User.Click()
This code works fine when the value is visible in the listbox without scrolling down. But if the value is at the bottom of the listbox (with vertical scroll bar enabled) then the above codes does not work.
I need your suggestion/help to develop a script, where it looks for the value in the listbox if it’s not present then scroll down and search for the value till the end of listbox. Your help would be a great help.
Currently the alternative way which I am using is as follows:
1) Look for value in listbox with above customize code. (Mark the step as continue on failure)
2) Press the vertical scroll bar. (Mark the step as continue on failure)
3) Look for value in listbox with above customize code. (Mark the step as continue on failure)
4) Press the vertical scroll bar. (Mark the step as continue on failure)
5) Look for value in listbox with above customize code.
This codes work fine but its not fully automate, and it has following issues:
1) If the value is at the bottom of a very large amount data in the list box then this will not work (stops after two vertical scroll down).
2) If the value is in the middle of the list box after one vertical scroll down pressed, then we will have few failed steps and the overall result of the test will be failed. Even though it had successfully passed the test.
Your help in this regards will be be much appreciated. Also please note that i have scripts written in VB
Cheers
Akbar
[CodedStep(@"Navigate to : 'http://www.mckerinsoftware.com/'")]
public void apibranchtest_CodedStep()
{
Manager.Settings.Web.UseHttpProxy = true;
// Navigate to : 'http://www.mckerinsoftware.com/'
ActiveBrowser.NavigateTo(http://www.mckerinsoftware.com/);
}
Error: PipeCommunication.AsyncPipeRead() : EXCEPTION ("Pipe Null State: False")
Type: ObjectDisposedException
Message: Cannot access a closed pipe.
Call Stack:
at System.IO.__Error.PipeNotOpen()
at System.IO.Pipes.PipeStream.CheckReadOperations()
at System.IO.Pipes.PipeStream.BeginRead(Byte[] buffer, Int32 offset, Int32 count, AsyncCallback callback, Object state)
at ArtOfTest.WebAii.Messaging.Process.PipeCommunication.AsyncPipeRead(PipeStream pipe, Byte[] bytes, Int32 offset, Int32 count)