c# - Switching tabs in IE while doing automation -


i trying automate web page. on there link , clicking it opens in tab. stuck here. have tried redirect option didn't work.

this web page code on trying automate:

<td class="">     <a href="../tmi/viewcustomerdetails.jsp?mcid=30000248243" target="_new">30000248243</a> </td> 

and doing:

public void theniclickatthemcid() {      var mcid = webbrowser.current.link(find.bytext("30000248243"));      if (!mcid.exists)      {           assert.fail("unable find mcid name");           mcid.click();      } } 

it open link not able move next tab. how can proceed further?

this webbrowser class:

using techtalk.specflow ;  using watin.core;  namespace webtest {     class webbrowser     {         public static ie current         {                         {                 if (!scenariocontext.current.containskey("browser")) scenariocontext.current["browser"] = new ie();                 return scenariocontext.current["browser"] ie;             }         }     } } 

this might help,

basically can try:

webbrowser.current.presstab(); webbrowser.current.waitforcomplete(); 

Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -