All about web_url and web_link in LoadRunner
If you're new here, you may want to subscribe to my RSS feed or email. Thanks for visiting!
Points to note with web_url and web_link:
- web_url is not a context sensitive function while web_link is a context sensitive function. Context sensitive functions describe your actions in terms of GUI objects (such as windows, lists, and buttons). Check HTML vs URL recording mode.
- If web_url statement occurs before a context sensitive statement like web_link, it should hit the server, otherwise your script will get error’ed out.
- While recording, if you switch between the actions, the first statement recorded in a given action will never be a context sensitive statement.
- The first argument of a web_link, web_url, web_image or in general web_* does not affect the script replay. For example: if your web_link statements were recorded as
web_link("Hi There","Text=Hello, ABC",LAST);
Now, when you parameterize/correlate the first argument to
web_link("{Welcome to LearnLoadRunner}","Text=Hello, ABC",LAST);
On executing the above script you won’t find the actual text of the parameter {Welcome to Learn LoadRunner} instead you will find {Welcome to Learn LoadRunner} itself in the execution log. However to show the correlated/parameterized data you can use lr_eval_string to evaluate the parameter.
How to handle pop-up windows in Oracle NCA?
We will see step-by-step procedure of how to handle the pop-up windows while using Oracle NCA protocol:
- Put the title of the pop-up window in nca_obj_status function.
- Find out where the pop-up is occurring, put the handling statement below it.
- The handling statement could be nca_popup_message_press or nca_message_box_press. To find out which function is suitable for your script, record a script using data that generates that popup window, click on the button and check which function gets recorded.
Example:
This piece of code will trigger a pop-up:
nca_set_window( "PopUpObjects");nca_lov_retrieve_items("PopUpObjects",1,20);nca_lov_select_item("PopUpObjects","POP UP NOTIFICATIONS");
If title of the window is “Warning”, put it inside the nca_obj_status function. The code would be something like-
int status;status=nca_obj_status("Warning");if (status = = 0)nca_popup_message_press("Warning","OK");// nca_message_box_press("Forms",1); Any one of them
