How to use 'Invoke Javascript Function' to fire
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
28-05-21 09:44 AM
Hello,
There is a web page that fires an event when user select the pull-down menu(combo box).
e.q.
<body>
<select>
<option>apple</option>
<option>orange</option>
<option>banana</option>
</select>
<script>
$('select').change(function() {
var text = $('option:selected').text();
console.log( text );
});
</script>
</body>
If I select this pull-down menu with "Select Item" , the event doesn't fire.
So I thought that I could fire the event by using the "Invoke JavaScript Function", but I don't know how to use.
Can someone please tell me how to use "Invoke JavaScript Function"?
Or is there other more appropriate technique?
Thanks in advance.
Mitsuko
Asia/Tokyo
------------------------------
------------------------------
Mitsuko
Asia/Tokyo
------------------------------
Mitsuko
Asia/Tokyo
------------------------------
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
28-05-21 02:14 PM
Hello, I hope you are well, then you can use the dynamic element and force the click.
I usually only use JS in extreme cases, I think the support team may have problems.
Try to map the first element and place it as dynamic, if you have to select other options, you can do this by XPATH or even by value
------------------------------
Emerson Ferreira
Sr Business Analyst
Avanade Brasil
+55 (081) 98886-9544
If my answer helped you? Mark as useful!
------------------------------
I usually only use JS in extreme cases, I think the support team may have problems.
Try to map the first element and place it as dynamic, if you have to select other options, you can do this by XPATH or even by value
------------------------------
Emerson Ferreira
Sr Business Analyst
Avanade Brasil
+55 (081) 98886-9544
If my answer helped you? Mark as useful!
------------------------------
Sr Cons at Avanade Brazil
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
31-05-21 04:59 AM
Hi Mitsuko,
Try spy the element using UIA mode. It seems to work in my instance.
------------------------------
Bruce Liu
Senior Product Consultant, Professional Services
Blue Prism
Australia/Sydney
------------------------------
Try spy the element using UIA mode. It seems to work in my instance.
------------------------------
Bruce Liu
Senior Product Consultant, Professional Services
Blue Prism
Australia/Sydney
------------------------------
