Forum Discussion

kaiiii's avatar
kaiiii
Regular Contributor
7 years ago

Enter a text into textbox

Here's a sample of code below:

 

Set Sell_currency =  Mobile.Device("Q3000").Process("com.cor.currency").Layout("NO_ID").Layout("action_bar_root").Layout("content").View("drawer_layout").ScrollView("homeScrollView").Layout("NO_ID").Layout("NO_ID", 2).Layout("sample2").Layout("NO_ID", 2).Layout("NO_ID").Layout("NO_ID").Layout("NO_ID").TextView("textYouSend")

Sell_currency.Click

Sell_currency.SetText(Project.variable.Currency("Amount"))

but it's not entering the text into text box.....also got there SetText_2 to SetText_8 types property...I don't know what's the difference between them and when we will use it

13 Replies

  • baxatob's avatar
    baxatob
    Community Hero

    1. Sell_currency.Click <--- don't you forgot the parenthesis? 

    2. Try Keys() method instead of SetText()

    • kaiiii's avatar
      kaiiii
      Regular Contributor

      I am using Vb script. for Click method, i think parenthesis() are optional. I did it several times and faced no issue.

       

      Yes.. i tried to used Keys instead of SetText() but it doesn't work

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        Hi,

         

        > i tried to used Keys instead of SetText() but it doesn't work

        Any more details as for what 'doesn't work' means?

        -- Nothing is entered into control?

        -- Error is posted to test log?

        -- Text is entered but seems to be not recognized by the control?

        -- Some other problem?

         

        To be on the safe side: have you checked in the debugger that the correct expected control is addressed, that the control exists and that test code attempts to enter correct value into control?