Raj_Qa
14 years agoContributor
Unable to use a text box
I am trying to enter some text in a text box, these are the scripts I have tried to use to get to that object, but nothing seems to work
set page= sys.process("firefox").waitpage("*LeadRoutingRule*", 5000)
page.Wait
set all=page.document.all
'enter test rule as the rule name
1.set object= page.nativewebobject.find("class", "TC_TitleInputBox")
2.set object= all.item("Title")
3.call a2
object.SetText("TestAutomation")
------------------------------------------------------------------------
function a2
Set page = Sys.Process("firefox").Page("*")
page.wait
set all=page.document.all
' Call the function
obj = page.EvaluateXPath("(//DIV[@class='formsection hilite-region']//INPUT[@id='Title'])[1]")
' Check the result
If VarType(obj) <> varNull Then
' If the element was found, click it
obj(0).Click ' Note we refer to the array item
Else
' If the element was not found, post a message to the log
Log.Message "The element was not found"
End If
end function
1,2,3 those are the 3 different ways i could get to the object, and none of them worked.
set page= sys.process("firefox").waitpage("*LeadRoutingRule*", 5000)
page.Wait
set all=page.document.all
'enter test rule as the rule name
1.set object= page.nativewebobject.find("class", "TC_TitleInputBox")
2.set object= all.item("Title")
3.call a2
object.SetText("TestAutomation")
------------------------------------------------------------------------
function a2
Set page = Sys.Process("firefox").Page("*")
page.wait
set all=page.document.all
' Call the function
obj = page.EvaluateXPath("(//DIV[@class='formsection hilite-region']//INPUT[@id='Title'])[1]")
' Check the result
If VarType(obj) <> varNull Then
' If the element was found, click it
obj(0).Click ' Note we refer to the array item
Else
' If the element was not found, post a message to the log
Log.Message "The element was not found"
End If
end function
1,2,3 those are the 3 different ways i could get to the object, and none of them worked.