Run Code Snippet with QuerySelector & Click method embedded
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Run Code Snippet with QuerySelector & Click method embedded
Hello,
How do I accomplish this for a Keyword Test? The link that needs to be clicked is of class "i.arrow-top". (See image attached).
Because the Object Spy cannot successfully identify this link, I thought of using Run Code Snippet with QuerySelector("i.arrow-top") and Click(). Is it possible to combine both methods in a single line of code? The goal is to click on the arrow-top link.
Also attached is a screenshot of my TestComplete workspace showing the Run Code Snippet parameter:
Aliases.browser.pageIsmadsMyDashboard2.QuerySelector("i.arrow-top").Click();
p.s. One more question: When attempting to use Object Spy, the entire browser window is highlighted instead. Could it be because the arrow-top's css display attribute is set to "block"?
Thanks in advance for any feedback 🙂
Arlene
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Arlene,
> Aliases.browser.pageIsmadsMyDashboard2.QuerySelector("i.arrow-top").Click();
I think this should work.
https://community.smartbear.com/t5/TestComplete-Functional-Web/how-Can-i-get-the-gylphicon-class-ele... and reply from Amey should explain what's going on in your case.
> the entire browser window is highlighted
Most probably, this is because your browser is not supported by your version of TestComplete. Visit https://support.smartbear.com/downloads/testcomplete/firefox-patches/ and/or https://support.smartbear.com/downloads/testcomplete/chrome-patches/ to check if the patch for the version of your browser and TestComplete exists and install it if it does.
/Alex [Community Champion]
____
[Community Champions] 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 Champions]
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 Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
