05-10-2017, 06:21 AM
Hi,
In my application I have a Search table (which is a WebElement), which has a Paging section "Page X of Y". The "X" is a WebNumber.
Since I am having synchronization issues, I figured, that I am going to inspect that "X" whenever I need to flip to the next page.
So here is what I tried
But that does not work, even though next page is visible, that "value" in that WebNumber is still 1.
What is more funny, after those 10s when I try
it is now 2...
So it seems that WaitProperty did not refresh.
I have changed that WebNumber into a WebEdit in my OR, but that didn't solve it.
I ended up doing this
The key was that RefreshObject.
But I really don't like it. Can anyone help me? Why is it not refreshing?
Regards
In my application I have a Search table (which is a WebElement), which has a Paging section "Page X of Y". The "X" is a WebNumber.
Since I am having synchronization issues, I figured, that I am going to inspect that "X" whenever I need to flip to the next page.
So here is what I tried
Code:
If (Browser("WebBrowser").Page("MainPage").WebElement("MyTable").WebNumber("PagingObject").WaitProperty("value", 2, 10000)) Then
//Do something
End If
But that does not work, even though next page is visible, that "value" in that WebNumber is still 1.
What is more funny, after those 10s when I try
Code:
Browser("WebBrowser").Page("MainPage").WebElement("MyTable").WebNumber("PagingObject").GetROProperty("value")
it is now 2...
So it seems that WaitProperty did not refresh.
I have changed that WebNumber into a WebEdit in my OR, but that didn't solve it.
I ended up doing this
Code:
Set pagingObject = Browser("WebBrowser").Page("MainPage").WebElement("MyTable").WebNumber("PagingObject")
While pagingObject.Object.value <> 2
wait 1
pagingObject.RefreshObject
Wend
The key was that RefreshObject.
But I really don't like it. Can anyone help me? Why is it not refreshing?
Regards