Contributions
Unable to locate "Leave site?" exit speedbump on Chrome v108
Afternoon is anybody aware of an update to this speedbump on leaving the chrome browser? We have a name mapped item: and associated button: We call this after we send a browser.Close() step in an OnStopTestCase event to catch if the .Close() fails. Some reason this is no longer working (chrome v108) and if I try to object spy or add a new object, it is not recognised Any ideas?!284Views0likes1CommentRe: Detect URL change in TestComplete
Thanks for the reply, yes I understand all this, thank you. For the select test cases we have where this does get triggered, I have already implemented an action and assertion for the data item using javascript to get the URL at time of action (or shortly after a property checkpoint). What I am looking to verify is actually the non-existence of the data item across the whole site and hundreds of tests we currently have. As these actions are already written, I don't particularly want to go in and add an assertion at each point where I know the URL changes and thus eligible for a check.1.4KViews1like2CommentsRe: Detect URL change in TestComplete
When a s user is logged in and they select an option from a menu we have on page, the page URL is populated with "data=menu". This is what I want to detect. I know how to get the URL etc and do the check myself. As said, what I don't want to do is run a script routine each time the user has clicked into these options, I wan this to be done by the system usinghttps://support.smartbear.com/testcomplete/docs/reference/events/onwebpagedownloaded.html as these option selection and subsequent URL populations will always be a new page load, but that doesn't work for Chrome. My question is this: Can the function in the above link "onWebPageDownload" be implemented somehow for Chrome1.4KViews1like4CommentsRe: Detect URL change in TestComplete
Hi. So when the customer interacts with certain items on our site, the URL will be populated with a specific item, this is what I want to detect. I'm aware I can use property checkpoints to check the page loaded, however I wanted to use the event function onwebpagedownload to execute this rather than run a script routine at every single point (in the test) where the customer traverses to a new page.1.4KViews1like6CommentsDetect URL change in TestComplete
I need to assert the contents of a URL as a user navigates through a site. We use Chrome and CANNOT use any other browsers. I initially looked to use events, specifically 'onwebpagedownloaded', to then run some javascript code to execute the content assertions: https://support.smartbear.com/testcomplete/docs/reference/events/onwebpagedownloaded.html However, this is not an option for Chrome: One way to do this would be to inject a script routine for every known page/url change on every keyword test, something I am keen to avoid. Any ideas on what I could try? Custom event? Thanks Dan1.5KViews2likes8CommentsFolder names to be included in script routine test selector window
I am overlaying a large amount of javascripts to a lot of different keyword journeys. My scripts' folder structure is closely mimicking the keyword test folder structure, to aid maintenance and tracking. When I go to select a specific script to inject via script routine into the keyword test, the window that is used for this selection only goes as far as '[project name] > [Script]' for the folders. It then lists hundreds of scripts I have. Which, when viewed in the navigator can be seen via the designed folder structure. The enhancement would be to see the same folder structure in the script routine test selector window.442Views0likes0CommentsRe: Cannot get array details from JSON object [undefined]
We got a resolution from SmartBear on this: "Unfortunately, TestComplete can't work with arrays like that contentDocument.parentWindow.digitalData.page_assets[0]. It's possible to access asset_id using eval(): page.contentDocument.Script.eval("digitalData.page_assets[0].asset_id")" This works perfectly.Hopefully this helps out others. Note:to the person who marked this as spam; your action is cowardly without comments, it is neither constructive nor correct and it was overturned. Unlucky.1.2KViews2likes0CommentsCannot get array details from JSON object [undefined]
There seems to be missing functionality with testComplete when attempting to get array details held within a JSON object. This is basic javascript and should work, regardless of testComplete. I am getting hold of a json object from the browser memory (the contentDocument.defaultView for eg), this json (let's call it digitalData as that's how it is referenced in the browser (or even in the console if you were to search there for it)) does also hold an array of objects (in this example, that array is called page_assets[]): { "page_data": { "page_url": "https://ourTestWebsite.co.uk/portal/SignUp", }, "page_assets": [ { "asset_id": "97be8bb9-2544-4c23-a407-89d0977d3284", "asset_category": "", "asset_sub_category": "", "asset_name": "Alert Panel", "asset": "Panel", "campaign": "", "has_emphasis": false, "standard": false, "type": "Alert", "variant": "Information", "title": "To allow us to continually improve, there will be planned system maintenance betwe" }, { "asset_id": "1eb085a6-b958-4dca-86bd-bde6e87e7817", "asset_category": "instance", "asset_sub_category": "", "asset_name": "Login Box", "asset": "Form Panel", "campaign": "", "has_emphasis": false, "standard": true, "type": "Login", "variant": "MVC", "title": "Log in" } ], "journey_data": { "home_page_section": null, "home_page_section_name": null, "home_page_total_sections": null, "internal_campaign": null, "is_mobile": "true", "currency_code": "GBP", "megamenu_clicked": null, "megamenu_item_campaign": null, "megamenu_item_location": null, "megamenu_item_top_selection": null, "megamenu_item_bottom_selection": null, "footer_clicked": null, "footer_item": null, "campaign_code": null, "login_success": "false", "logout_success": null, "registration_success": null, "search_result_clicked": null, "search_result_position": null, "search_result_title": null, "branch_search_name": null, "branch_search_clicked": null, "branch_search_position": null, "cookie_policy_header_link_clicked": null, "portal_nav_clicked": null, "portal_nav_item": null, "agm_registration": null, "agm_email_contact": null, "contact_form_info": { "account_number": null, "preferred_contact_time": null, "receive_contact": null, "form_type": null, "feedback_reason": null }, "key_element_clicked": null, "key_element_data": { "asset_category": null, "asset_sub_category": null, } }, } Using Sys.Browser("*").Page("*").contentDocument.parentWindow.digitalData.page_data.page_url I correctly get the value "https://ourTestWebsite.co.uk/portal/SignUp" However when looking for the array detail; using Sys.Browser("*").Page("*").contentDocument.parentWindow.digitalData.page_assets[0].asset_id I get a javascript runtime error "typeError: cannot read property 'asset_id' of undefined" As said, surely the basic javascript functions should work for this. You can test this should work by going tohttps://playcode.io/new/ Enter the above json as 'var = digitalData {insertJSONabove} print to console digitalData.page_data.page_url which will return 'https://ourTestWebsite.co.uk/portal/SignUp' to prove the non array held details, or digitalData.page_assets[0].asset_id to get '97be8bb9-2544-4c23-a407-89d0977d3284' (array details). Any ideas?Solved1.2KViews0likes1Comment- 1.6KViews1like0Comments