Ask a Question

finding object in human-written html files

radu
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
Marsha_R
Community Hero

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


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
radu
Occasional Contributor

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

Marsha_R
Community Hero

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


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
cunderw
Community Hero

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
TanyaYatskovska
SmartBear Alumni (Retired)

Hi All,

 

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

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager



cancel
Showing results for 
Search instead for 
Did you mean: