power_settings_new
Hi there,

I am able to select and show only one email item on gmail but do not know yet how to click on that item. I tried the Console but not able yet.

Thanks

Dimos
by (171 points)
Can you share your code and error as well??
by
Hi Mayur,
I am using Chrome gmail and need to click to email message and see its contents. I know how to filter it and but not sure how to use JavaScript/jQuery to click on the shown item. I was looking for a gmail api that I can use with JavaScript. There are no errors just an action to click on the the email body. I am also looking into Google Gmail Api for possible ideas.

Thanks
Dimos

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

1 Answer

by (171 points)
0 votes

From your comment I understood that you're looking for a JavaScript click event.

Say, below is your HTML element.

<input type="checkbox" id="myChkBox" onmouseover="myFn()" onclick="alert('Clicked!')">

 

You can click by below function.

<script>
function myFn() { //This function will be invoked while you mouse over an element
    document.getElementById("myChkBox").click(); // This function will click on the element
}
</script>

 

Hope that helps. Feel free to reply with your comment.

by
Thank you again for your time. I know how to reproduce the click event with Selenide but my question is that I do not really know the ID of the row during runtime since it's a dynamic id naming process. The gmail message displays a label Inbox and I need to get its ID. I think I'm almost there by using loop and filtering.
by (171 points)
Yes, loop and filtering is something we need to do when we are dealing with rows. Try that and let me know if you are stuck.
add
...