cancel
Showing results for 
Search instead for 
Did you mean: 

Invisible Checkbox, can't select

SOLVED
Highlighted
New Contributor

Invisible Checkbox, can't select

I need select one of this checkbox,but as you can see from the picture when I try to select the checbox, the whole text box is selected. I tried with xpath, but keep telling me that the object is not visible on the page. Does anyone have any idea how to solve? I use version 12 with Vbscript

'Set obj = page.EvaluateXPath("//div[@id='register-step-2']/fieldset[6]/div/label") not work

'Set obj= page.FindChildByXPath("//*[@id='news']/self::input[@type='checkbox']")not work

Help

 

Immagine.png

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
New Contributor

Re: Invisible Checkbox, can't select

Solved, i use browser native metod: NativeFirefoxObject. If an element was hidden, use this metod, click on object->work with Object Through Property-> select your browser. it works fine

View solution in original post

Highlighted
Community Hero

Re: Invisible Checkbox, can't select

@Mario87:

Hi,

 

Good to hear that you solved the problem.

Alternative approach that may work as well is to set the input focus to the target control and send it keyboard keys sequence that executes required task.

Sample pseudo-code for your case:

Set chbox = page.someContainer.FindChild("id", "firstcheckbox", 10)

If (chbox.Exists) Then

  chbox.SetFocus() ' sets input focus

  chbox.Keys(" ") ' presses Space key. This should switch check-box state

Else

  ' some actions

End If

 

 

Regards,
  /Alex [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
================================

View solution in original post

7 REPLIES 7
Highlighted
Community Hero

Re: Invisible Checkbox, can't select

Look at these requirements and be sure that you have what you need for the browser(s) you are using:

https://support.smartbear.com/testcomplete/docs/app-testing/web/general/supported-browsers-and-techn...

Highlighted
New Contributor

Re: Invisible Checkbox, can't select

I use Firefox last version supported from testcomplete! The checkbox is not visibile on screen! testcomplete can’t record only the checkbox, but can record all the webpage. How i can change the value to visibile? With Javascript ?
Highlighted
Occasional Contributor

Re: Invisible Checkbox, can't select

Hi @Mario87.  This appears to be a common issue with several individuals asking questions on the forum.  If you are not finding the answer in other forum topics, then may have to contact SmartBear's TestComplete Support.  

 

Here is a post about similar issues within Firefox object identification. 

https://community.smartbear.com/t5/TestComplete-Functional-Web/Is-TestComplete-compatible-with-FireF...

Highlighted
New Contributor

Re: Invisible Checkbox, can't select

@Duess, i can record and inspect all the object in the page, but i can’t only recognize the checkbox, i use xpath, but didn’t work. When I run my test, it fails because he can’t found the element in the page. I try with chrome and ie but nothing. all version are supported beacause I have the last version of testcomplete... can I try with a different method from xpath? Use JavaScript? CSS selector? I have no idea
Highlighted
Community Hero

Re: Invisible Checkbox, can't select

Here's a link to Support.  Ask them your question directly:

https://support.smartbear.com/message/?prod=TestComplete

Highlighted
New Contributor

Re: Invisible Checkbox, can't select

Solved, i use browser native metod: NativeFirefoxObject. If an element was hidden, use this metod, click on object->work with Object Through Property-> select your browser. it works fine

View solution in original post

Highlighted
Community Hero

Re: Invisible Checkbox, can't select

@Mario87:

Hi,

 

Good to hear that you solved the problem.

Alternative approach that may work as well is to set the input focus to the target control and send it keyboard keys sequence that executes required task.

Sample pseudo-code for your case:

Set chbox = page.someContainer.FindChild("id", "firstcheckbox", 10)

If (chbox.Exists) Then

  chbox.SetFocus() ' sets input focus

  chbox.Keys(" ") ' presses Space key. This should switch check-box state

Else

  ' some actions

End If

 

 

Regards,
  /Alex [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
================================

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Script Wanted
Let's start July with new challenges!

Create a script to pass custom command-line arguments as a test parameter for the TechCorner tag!

Will you dare to take the challenge?


Top Kudoed Authors