Is TC able to manipulate webpage by using browser developer tool?
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is TC able to manipulate webpage by using browser developer tool?
Hi there,
I have a test that needs to manipulate webpages, just wondering if anyone know whether TC is able to manipulate webpage by using browser developer tool? I tried to use TC to spy the objects in chrome developer tool, but it didn't allow me to.
Thanks in advance
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No TestComplete is not able to interact with the developer console.
What are you trying to do? We might be able to help you find a way without the developer console.
--------------------
Senior SQA Automation Engineer
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would like to perform some suspicious activities on my test page and see if they are handled properly. For instance, making a required field to optional, or hacking a disabled button to enabled by manipulating through the developer console, things like that.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I think that such activities can be done by either modifying page markup or/and injecting additional page script code. Read this article and consider whether it can help: https://support.smartbear.com/testcomplete/articles/embedding-scripts-into-web-pages/
/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
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, I think this works
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I followed the example in the given article, but not sure how to set the script type to JavaScript in VBScript. It is giving this error message to me.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Never mind, I figured it out.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi again,
I am getting error from the codes that was working 2 month ago. It is complaining "Unable to find the object Application. See Details for additional information.", but it was working before with the exact same codes. Any idea what is going on?
PageDocument = Aliases.browser.Page("*").Application.document
body = PageDocument.body
script = PageDocument.CreateElement("script")
Call script.setAttribute("type", "text/javascript")
script.text = "function disableButton() { document.getElementById(""btnSignin"").disabled = ""disabled""; }disableButton();"
script = Body.InsertBefore(script, null)
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What has changed since the last time the code worked? Windows upgrades, browser upgrades, TestComplete upgrades, change in test environment?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Don't remember what has been changed, it has been a while, but our IT team has switched the anti-virus software to another one that I can be sure. Other tests are running good, so it is not the new anti-virus failing the test.
It is complaining on the first line PageDocument = Aliases.browser.Page("*").Application.document that Application couldn't be found, I believe it is a browser page property, so even though my environment changed, they should impact the browser page properties.
I grab the codes from https://support.smartbear.com/testcomplete/articles/embedding-scripts-into-web-pages/, but this page seems not available anymore
