Forum Discussion
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.
- Marsha_R3 years agoModerator
So when the customer interacts with certain items on our site, the URL will be populated with a specific item
I take from this that you want to check the URL itself and not something on the page. Would you give us an example of what's happening and what you would like to check?
- geneticmaterial3 years agoContributor
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 using https://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 Chrome- AlexKaras3 years agoChampion Level 3
Hi,
Personally I am not sure that the idea with event is the best one.
What is the goal of your verification?
From your explanation I got it that you'd like to check that url contains certain data after certain action. Why not to explicitly check this by combining an action and verification into one function and do not bother about event that can be triggered at some other moment?
It is possible to inject arbitrary code into web page (https://support.smartbear.com/testcomplete/docs/app-testing/web/common-tasks/javascript.html) and bind this code to browser-specific event (like page load), but again, my preference is the explicit check for explicit action as it is usually done with testing: you plan action, you perform action, you check for the expected result.
Related Content
- 12 years ago
- 2 years ago
Recent Discussions
- 3 days ago
- 8 days ago
- 12 days ago