Question

I am facing an issue while set a value in a WebEdit object in a Web based application. The web page has been developed using GWT.

Please find the below code.

Function webeditObject(webeditProperty1, webeditValue1, webeditProperty2, webeditValue2) 
   Set WebEditObj=description.Create
   WebEditObj("micclass").value="WebEdit"
   WebEditObj(webeditProperty1).value=webeditValue1
   WebEditObj(webeditProperty2).value=webeditValue2  
   Set webeditObject=WebEditObj
End Function

Calling

Set webeditObj = webeditObject("class", "grid-dropdownbox", "index" , "36")
If Browser(browserObj).Page(pageObj).WebTable(webtableObj).WebElement(webeditObj).Exist(0) Then
                           Browser(browserObj).Page(pageObj).WebTable(webtableObj).WebElement(webeditObj).Set dict.Item("id")  

End  If

I know till the WebTable its working. But its trying to identify the WebEdit its not be able to identify the object.

![enter image description here][1]

Please help me to resolve this issue.

Was it helpful?

Solution

Could you please change Browser(browserObj).Page(pageObj).WebTable(webtableObj).WebElement(webeditObj).Set dict.Item("id")

into
Browser(browserObj).Page(pageObj).WebTable(webtableObj).WebEdit(webeditObj).Set dict.Item("id")

Webelement().set "x" May work but not always.

"*********************************************************************************************************************************"

It seems your WebEdit object is inside a WebTable So Please check whether it is dynamic(Some time property may change dynamically )

Instead of using B().P().WebTable().WebEdit().set dict.Item("id")

Try to use Set oEdit = B().P().Webtable().Childitem(row,column,"WebEdit",Index)

oEdit.Set dict.Item("id")

Make sure the length of the textbox.

Don't forget to add visible property(Some times you may see only one text box in the page but there might be couple of textboxes hiding inside the page with same properties ...This might give problem when we try to set a value...Better use Visible property )

Please let me know if the above mentioned couldn't resolve the issue..

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top