How To Programmatically Click The LI element

Dear Brothers And Sisters

I am Making a Programm in vC# 2005
I am Automating My Email On yahoo Mail.
But When i try To Click Sign Out ( programmatically).
It Clicks My Email id That Is Displayed To Its left Side.

How Can This Be Acommplished Every Thing is going on well
But for the Sign out.
Here is what i do to get it clicked

public static void ClickSignOut()

object Doc = null ;
object x = null ;

Doc = InternetExplorerApp.Document ;

if ( DocumentCompleted == true )

if ( Doc != null )

x = ((mshtml.HTMLLIElementClass)((mshtml.HTMLDocument)Doc).getElementById("ygmagrtlinks"));
if (((mshtml.HTMLLIElementClass)x).innerText == "Sign Out")



The Code Might Appear Hotch - potched That is Because i dont know
how to indent it on this Editor.Why Is There no Horizontal Scroll on it.
Well see if you can make out something of it.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!