0

I am using true client protocol and I have a web app with a search button implemented using an Image. I click on that image button to extract some results.

html code of Search button is:

< img style="border: medium none;" 
onclick="ajaxLoadingStarted(this, document.getElementById('select:ajaxLoadingImg')); searchVehicles();" 
src="/webPortal/common/images/green-search-btn.png" id="select:searchBtn">

and my javascript code is:

var searchobj = document.getElementById('select:searchBtn').onclick();

Unfortunately, I got this error:

t=00019690ms: Error -203252: 46: Evaluate JavaScript code / window.alert($('#javax.face...ement; } } / failed - exception occured: NS_ERROR_NOT_AVAILABLE: Component is not available [MsgId: MERR-203252]

Why might this be happening?

durron597
  • 31,968
  • 17
  • 99
  • 158

2 Answers2

0

Certain functionality is not available if you play an individual step instead of playing the script from the start. An alternative would be to create a breakpoint on the step after the one you are trying, and play the entire script from the beginning.

kxsong
  • 440
  • 4
  • 13
0

I have also faced similar issue while scripting.The solution would be:

  1. Use Ajax Click and Script protocol to record it.
  2. If it is still not recognized then use the following code:

 

web_text_link("", 
    "Snapshot=t50.inf", 
    DESCRIPTION, 
    "Text="",
    "ID=select:searchBtn", 
    ACTION, 
    "UserAction=Click", 
LAST);
LittleBobbyTables - Au Revoir
  • 32,008
  • 25
  • 109
  • 114