Hi Team,
I have 3 different list boxes in my WebPage, after the selection of the any item in the First ListBox the WebPage will refresh, then will populate the appropriate data into the other 2 ListBoxes.
Here my issue is after the selection of the first ListBox, the second ListBox is not been clicked for the selection of any item under it.
I have used the following code...
repo.LstBox1.Click
LibraryFunctions.ListBoxValueSelect("Item1") 'Method to select the appropriate used defined data
repo.LstBox2.EnsureVisible ' Have used repo.LstBox2.Focus - also - but no use not working
repo.LstBox2.Click
LibraryFunctions.ListBoxValueSelect("Item1")
repo.LstBox3.EnsureVisible
repo.LstBox3.Click
LibraryFunctions.ListBoxValueSelect("Item1")
Have observed the cursor is moved to Top Left end cornor of the WebPage after the selection of the first ListBox item.
Any suggestions...Plz..
Regards,
Dal...
Selecting the ListBox Value after a Refresh of a WebPage
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Selecting the ListBox Value after a Refresh of a WebPage
Hi,
Have you tried to use a delay between your actions, maybe your script is to fast and therefore Ranorex clicks to the top-left of your screen.
Regards,
Peter
Ranorex Team
Have you tried to use a delay between your actions, maybe your script is to fast and therefore Ranorex clicks to the top-left of your screen.
Regards,
Peter
Ranorex Team
Re: Selecting the ListBox Value after a Refresh of a WebPage
Yes Peter.. I tried by giving the delay upto 10 secs...
The refreshed page was displayed in 5 secs time...
If I click the object manually after the page refresh, its able to select the Item which I want to select from the list. But I don't want give a try manually since we might plan un-attended execution once the complete packages are developed.
Regards,
Dal...
The refreshed page was displayed in 5 secs time...
If I click the object manually after the page refresh, its able to select the Item which I want to select from the list. But I don't want give a try manually since we might plan un-attended execution once the complete packages are developed.
Regards,
Dal...
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Selecting the ListBox Value after a Refresh of a WebPage
Hi,
Would it be possible to send us a tiny sample application with the same issue? And maybe your code you try to execute. Because I tried to reproduce this issue but I had no success.
Thanks in advance.
Regards,
Peter
Ranorex Team
Would it be possible to send us a tiny sample application with the same issue? And maybe your code you try to execute. Because I tried to reproduce this issue but I had no success.
Thanks in advance.
Regards,
Peter
Ranorex Team
Re: Selecting the ListBox Value after a Refresh of a WebPage
Hi Peter,
I tried the possible way I can think of, but I had no success.
Is that possible to connect through WebEx / Net Meeting to analyse the issue tomorrow (09/30), and based on your suggestions we will take it forward.
Regards,
Dal...
I tried the possible way I can think of, but I had no success.
Is that possible to connect through WebEx / Net Meeting to analyse the issue tomorrow (09/30), and based on your suggestions we will take it forward.
Regards,
Dal...
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Selecting the ListBox Value after a Refresh of a WebPage
Hi,
Please check the RxPath of the second list-box, after you refresh your page, maybe the RxPath is not the same and therefore Ranorex clicks to the top left. Please try also to disable the folder caching of your repository items. Therefore please take a look to following page http://www.ranorex.com/support/user-gui ... html#c2076
Regards,
Peter
Ranorex Team
Please check the RxPath of the second list-box, after you refresh your page, maybe the RxPath is not the same and therefore Ranorex clicks to the top left. Please try also to disable the folder caching of your repository items. Therefore please take a look to following page http://www.ranorex.com/support/user-gui ... html#c2076
Regards,
Peter
Ranorex Team
Re: Selecting the ListBox Value after a Refresh of a WebPage
Hi Team,
Thanks for the info...
I have checked the second list-box's RxPath as well, its still the same as it was.
I found a solution in other way, by giving the Delay.speedfactor = 1.0, (which is the default) ...
For finding the solution for script play-back speed up this was set to 0 instead of the default value.
The Code Sample as below:
Keyboard.DefaultKeyPressTime = 0
Mouse.DefaultClickTime = 0
Mouse.DefaultMoveTime = 0
Delay.SpeedFactor = 1.0
repo.LstBox1.Click
LibraryFunctions.ListBoxValueSelect("Item1")
Delay.Seconds(10)
repo.LstBox2.Click
LibraryFunctions.ListBoxValueSelect("Item1")
repo.LstBox3.Click
LibraryFunctions.ListBoxValueSelect("Item1")
But I do have a question here is there a way to suppress Delay.Seconds(10) in my code... I just tried with the following ... but it didn't wait...for the existance and executed the code ---- repo.LstBox2.Click ---- immediately
If repo.LstBox2Info.Exists Then
repo.LstBox2.Click
LibraryFunctions.ListBoxValueSelect("Item1")
End If
Any suggestions...
Appreciate all your help on the questions I have raised on this "Lively" Forum
Regards,
Dal...
Thanks for the info...
I have checked the second list-box's RxPath as well, its still the same as it was.
I found a solution in other way, by giving the Delay.speedfactor = 1.0, (which is the default) ...
For finding the solution for script play-back speed up this was set to 0 instead of the default value.
The Code Sample as below:
Keyboard.DefaultKeyPressTime = 0
Mouse.DefaultClickTime = 0
Mouse.DefaultMoveTime = 0
Delay.SpeedFactor = 1.0
repo.LstBox1.Click
LibraryFunctions.ListBoxValueSelect("Item1")
Delay.Seconds(10)
repo.LstBox2.Click
LibraryFunctions.ListBoxValueSelect("Item1")
repo.LstBox3.Click
LibraryFunctions.ListBoxValueSelect("Item1")
But I do have a question here is there a way to suppress Delay.Seconds(10) in my code... I just tried with the following ... but it didn't wait...for the existance and executed the code ---- repo.LstBox2.Click ---- immediately
If repo.LstBox2Info.Exists Then
repo.LstBox2.Click
LibraryFunctions.ListBoxValueSelect("Item1")
End If
Any suggestions...
Appreciate all your help on the questions I have raised on this "Lively" Forum
Regards,
Dal...
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Selecting the ListBox Value after a Refresh of a WebPage
Hi dal,
With your code:
Regards,
Peter
Ranorex Team
With your code:
If repo.LstBox2Info.Exists Then repo.LstBox2.Click LibraryFunctions.ListBoxValueSelect("Item1") End IfRanorex will not wait because you have set not delay inside your if statement. If you set a Delay after the if statement Ranorex should wait for the expected time you set.
Regards,
Peter
Ranorex Team
Re: Selecting the ListBox Value after a Refresh of a WebPage
Hi Peter,
I agree with you, but my question is little different, after the page refresh, can't I wait for second ListBox object to be appeared on the web page before performing any action to it. Like typical WaitForExistance, without specifying the hard-coded delay as Delay.Seconds(10).
The following one won't perform WaitForExistance operation? :
I thought it will wait for the object until Search Timeout (say max of 10s) for that object and perform an action on it. But if the object displayed in less than 10s also it will perform the action on it immediately, as this is not a hard-coded wait
Kindly suggest...
Regards,
Dal...
I agree with you, but my question is little different, after the page refresh, can't I wait for second ListBox object to be appeared on the web page before performing any action to it. Like typical WaitForExistance, without specifying the hard-coded delay as Delay.Seconds(10).
The following one won't perform WaitForExistance operation? :
Code: Select all
If repo.LstBox2Info.Exists Then
End If
Kindly suggest...
Regards,
Dal...
Re: Selecting the ListBox Value after a Refresh of a WebPage
Try doing a while loop that waits until the object exists...
I.e.
While repo.LstBox2Info.Exists == false
wait
Loop
I.e.
While repo.LstBox2Info.Exists == false
wait
Loop
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!
Ciege...
Ciege...
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Selecting the ListBox Value after a Refresh of a WebPage
Hi,
I would also suggest you the solution of Ciege, or use following method.
Regards,
Peter
Ranorex Team
I would also suggest you the solution of Ciege, or use following method.
public static void WaitForExistance(TimeSpan timeout) { System.DateTime abortTime = System.DateTime.Now + timeout; while (!repo.yourItemInfo.Exists()) { if (System.DateTime.Now > abortTime) throw new RanorexException("Timeout reached for your Element"); } }and overload the method as follow
WaitForExistance(new TimeSpan(0, 0, 10));This method will wait for your element and abort if the timeout is reached.
Regards,
Peter
Ranorex Team