cancel
Showing results for 
Search instead for 
Did you mean: 

finding object in human-written html files

Occasional Contributor

finding object in human-written html files

Dear all,

 

I have a very simple html (see the attached code) and I don't know how to make TestComplete see the radio buttons. I've tried looking with DisplayObjectSpy, but I can't see anything useful to point me to the radio buttons.

 

In principle, I would need to check which of these two radio buttons is checked.

 

I'm using TC12.42.3048.7 on x64 and for web testing I'm using Tree model.

 

What I get in ObjectBrowser:

 

question.png

The code:

 

<!DOCTYPE html>
<html>
<head>
<title>blablabla</title>
</head>
<body>

<form action="testResultAcquire.html">
  <fieldset>
    <legend>Test result:</legend>
    <form>
      <input type="radio" name="testResult" value="passed"> Test passed<br>
      <input type="radio" name="testResult" value="failed"> Test failed<br>
    </form>     
  </fieldset>
</form>
</body>
</html>

Thank you!
R

5 REPLIES 5
Community Hero

Re: finding object in human-written html files

Try recording a test where you click the buttons and see what TC uses to reference them.

Occasional Contributor

Re: finding object in human-written html files

Hi Marsha!

 

I've tried your approach, but unfortunately I didn't get anything usefull (I've done some clicks on the radio buttons):

 

function Test1()
{
  var chrome_RenderWidgetHostHWND;
  chrome_RenderWidgetHostHWND = Aliases.browser.BrowserWindow.Chrome_RenderWidgetHostHWND;
  chrome_RenderWidgetHostHWND.HScroll.Pos = 0;
  chrome_RenderWidgetHostHWND.VScroll.Pos = 0;
  chrome_RenderWidgetHostHWND.Click(88, 45);
  chrome_RenderWidgetHostHWND.Click(37, 42);
  chrome_RenderWidgetHostHWND.Click(36, 66);
}

Thank you!

R

Community Hero

Re: finding object in human-written html files

Have you used the point and fix option in Object Spy to try to look at the radio buttons?

https://support.smartbear.com/testcomplete/docs/testing-with/exploring-apps/object-spy/about.html

Highlighted
Community Hero

Re: finding object in human-written html files

It doesn't look like you are properly setup and you're not seeing any of the internal page objects.

 

Have you been through this?

https://support.smartbear.com/testcomplete/docs/app-testing/web/general/preparing-browsers/index.htm...


Thanks,
Carson

Click the Accept as Solution button if my answer has helped
Community Manager

Re: finding object in human-written html files

Hi All,

 

@radu, was the question resolved? Please share the solution you've found.

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓


Participate in the API Testing vs. UI Testing online community event to win great prizes!
New Here?
Join us and watch the welcome video:
Join the Online Event to Win