RGD: Unable to locate element: {"method":"id","selector":"mmlink1"}

1,437 views
Skip to first unread message

Karunanidhi Ethiraj

unread,
May 16, 2013, 12:11:08 PM5/16/13
to seleniu...@googlegroups.com
Hi All

i have given below the code which is thought the error.


CODE:


import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.interactions.Actions;

public class Admin {

public static void main(String[] args) throws InterruptedException {

WebDriver driver = new FirefoxDriver();

driver.get("http://localhost/sm7");

System.out.println(driver.getTitle());

driver.manage().window().maximize();

//System.out.println(driver.getTitle());

driver.switchTo().frame("fraSM");

driver.findElement(By.id("txtUserName")).clear();

driver.findElement(By.id("txtUserName")).sendKeys("karuna");

driver.findElement(By.id("txtPassword")).clear();

driver.findElement(By.id("txtPassword")).sendKeys("sm7");

driver.findElement(By.name("Image15")).click();

Thread.sleep(3000L);

System.out.println("Logged In");

driver.switchTo().defaultContent();

//driver.switchTo().frame("fraSM");


//driver.findElement(By.xpath("html/body/table/tbody/tr/td/table/tbody/tr[2]/td/table/tbody/tr/td[1]/div[1]/a"));
driver.switchTo().frame("fraSM");
driver.findElement(By.id("mmlink0")).click();

driver.findElement(By.id("mmlink1")).click();
driver.findElement(By.id("mmlink3")).click();

driver.quit();


}


}



ERROR:

--------------------

ShipManager 7.0
Logged In
Exception in thread "main" org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"id","selector":"mmlink1"}
Command duration or timeout: 219 milliseconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '2.32.0', revision: '6c40c18', time: '2013-04-09 17:23:22'
System info: os.name: 'Windows XP', os.arch: 'x86', os.version: '5.1', java.version: '1.7.0_21'
Session ID: cf35f91f-7ab7-4d96-a17e-02e1e3bb2c87
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{platform=XP, databaseEnabled=true, cssSelectorsEnabled=true, javascriptEnabled=true, acceptSslCerts=true, handlesAlerts=true, browserName=firefox, browserConnectionEnabled=true, nativeEvents=true, webStorageEnabled=true, rotatable=false, locationContextEnabled=true, applicationCacheEnabled=true, takesScreenshot=true, version=14.0.1}]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:187)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:307)
at org.openqa.selenium.remote.RemoteWebDriver.findElementById(RemoteWebDriver.java:348)
at org.openqa.selenium.By$ById.findElement(By.java:216)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:299)
at Admin.main(Admin.java:46)
Caused by: org.openqa.selenium.remote.ErrorHandler$UnknownServerException: Unable to locate element: {"method":"id","selector":"mmlink1"}
Build info: version: '2.32.0', revision: '6c40c18', time: '2013-04-09 17:23:22'
System info: os.name: 'Windows XP', os.arch: 'x86', os.version: '5.1', java.version: '1.7.0_21'
Driver info: driver.version: unknown
at <anonymous class>.<anonymous method>(file:///C:/WINDOWS/TEMP/anonymous8800449844697666655webdriver-profile/extensions/fxdr...@googlecode.com/components/driver_component.js:8405)
at <anonymous class>.<anonymous method>(file:///C:/WINDOWS/TEMP/anonymous8800449844697666655webdriver-profile/extensions/fxdr...@googlecode.com/components/driver_component.js:8414)
at <anonymous class>.<anonymous method>(file:///C:/WINDOWS/TEMP/anonymous8800449844697666655webdriver-profile/extensions/fxdr...@googlecode.com/components/command_processor.js:10421)
at <anonymous class>.<anonymous method>(file:///C:/WINDOWS/TEMP/anonymous8800449844697666655webdriver-profile/extensions/fxdr...@googlecode.com/components/command_processor.js:10426)
at <anonymous class>.<anonymous method>(file:///C:/WINDOWS/TEMP/anonymous8800449844697666655webdriver-profile/extensions/fxdr...@googlecode.com/components/command_processor.js:10366)







Thanks & Regards,

Maritime Leadership. All the way

Karunanidhi E

Teledata Marine Solutions
T + 91 44 4220 7000
F + 91 44 42207051
M + 91 9994789611
E karuna...@teledatamarine.com
W teledatamarine.com

Mark Collin

unread,
May 17, 2013, 3:31:09 AM5/17/13
to seleniu...@googlegroups.com
The error is that the element you are locating using the id "mmlink1"
does not exist on your page when you try to find it.
> ile/extensions/fxdr...@googlecode.com/components/driver_component.js:8414
> )
> at <anonymous class>.<anonymous
> method>(file:///C:/WINDOWS/TEMP/anonymous8800449844697666655webdriver-prof
> ile/extensions/fxdr...@googlecode.com/components/command_processor.js:104
> 21)
> at <anonymous class>.<anonymous
> method>(file:///C:/WINDOWS/TEMP/anonymous8800449844697666655webdriver-prof
> ile/extensions/fxdr...@googlecode.com/components/command_processor.js:104
> 26)
> at <anonymous class>.<anonymous
> method>(file:///C:/WINDOWS/TEMP/anonymous8800449844697666655webdriver-prof
> ile/extensions/fxdr...@googlecode.com/components/command_processor.js:103

Karunanidhi Ethiraj

unread,
May 17, 2013, 3:37:43 AM5/17/13
to seleniu...@googlegroups.com
Hi mark

That specified element is available.


Thanks & Regards,

Maritime Leadership. All the way
Karunanidhi  E
Teledata Marine Solutions
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Mark Collin

unread,
May 17, 2013, 3:58:06 AM5/17/13
to seleniu...@googlegroups.com
Not when Selenium is trying to find it it's not.

You either need to use an explicit wait to give the page time to render
it, or you are in the wrong frame/window.

Ugo Morin

unread,
May 17, 2013, 4:07:57 AM5/17/13
to seleniu...@googlegroups.com
I have the same problem, and I think we are not in the good frame, because i'm sure that name is correct :

        driver.findElement(By.xpath("//table[@id='listecoll']/tbody/tr[2]/td[6]/a")).click();
        driver.switchTo().frame(nomFrame);
        driver.findElement(By.linkText("Consommations")).click();
        driver.findElement(By.linkText("Engagement")).click();
        driver.findElement(By.xpath("(//a[contains(text(),'Dépense')])[13]")).click();

        nomFrame = "coriolisFrame";
        selenium.highlight(nomFrame);
        selenium.selectFrame(nomFrame);
        //driver.switchTo().defaultContent();
       
        System.out.println(nomFrame);

        driver.findElement(By.id("CHAPCOD")).clear();
        driver.findElement(By.id("CHAPCOD")).sendKeys("011");

But, i don't know why Selenium does not switch in that frame
>> ile/extensions/fxdriver@googlecode.com/components/driver_component.js:8405
>> )
>>         at <anonymous class>.<anonymous
>> method>(file:///C:/WINDOWS/TEMP/anonymous8800449844697666655webdriver-prof
>> ile/extensions/fxdriver@googlecode.com/components/driver_component.js:8414
>> )
>>         at <anonymous class>.<anonymous
>> method>(file:///C:/WINDOWS/TEMP/anonymous8800449844697666655webdriver-prof
>> ile/extensions/fxdriver@googlecode.com/components/command_processor.js:104
>> 21)
>>         at <anonymous class>.<anonymous
>> method>(file:///C:/WINDOWS/TEMP/anonymous8800449844697666655webdriver-prof
>> ile/extensions/fxdriver@googlecode.com/components/command_processor.js:104
>> 26)
>>         at <anonymous class>.<anonymous
>> method>(file:///C:/WINDOWS/TEMP/anonymous8800449844697666655webdriver-prof
>> ile/extensions/fxdriver@googlecode.com/components/command_processor.js:103

Karunanidhi Ethiraj

unread,
May 17, 2013, 4:18:20 AM5/17/13
to seleniu...@googlegroups.com

Yes I have facing  this issue last couple of weeks but no positive ….result still am trying.

 

 

Thanks & Regards,

 

Maritime Leadership. All the way

Karunanidhi  E

Teledata Marine Solutions
M + 91 9994789611

E karuna...@teledatamarine.com

 

--

You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.

Ugo Morin

unread,
May 17, 2013, 4:17:32 AM5/17/13
to seleniu...@googlegroups.com, karuna...@teledatamarine.com
Thank you to let me know if you find the solution

Karunanidhi Ethiraj

unread,
May 17, 2013, 4:24:07 AM5/17/13
to Ugo Morin, seleniu...@googlegroups.com

Ya sure…………friend

 

 

Thanks & Regards,

 

Maritime Leadership. All the way

Karunanidhi  E

Teledata Marine Solutions
M + 91 9994789611

E karuna...@teledatamarine.com

 

Avikash Gorka

unread,
May 17, 2013, 6:29:34 AM5/17/13
to Selenium Users
try selecting that parent frame again before clicking on the mmlink1.
May be you are loosing frame at runtime.

 driver.switchTo().frame("fraSM");
 driver.findElement(By.id("mmlink0")).click();

driver.findElement(By.id("mmlink1")).click();
driver.findElement(By.id("mmlink3")).click();

Thanks & Regards,

Avikash Gorka
Sr Test Engineer

Karunanidhi Ethiraj

unread,
May 17, 2013, 6:52:14 AM5/17/13
to seleniu...@googlegroups.com

Hi Avikash Gorka

 

 

Actually this is the mouse over link. Am not aware about this plz provide correct code for this.

 

 

Thanks & Regards,

 

Maritime Leadership. All the way

Karunanidhi  E

Teledata Marine Solutions
M + 91 9994789611

E karuna...@teledatamarine.com

 

>> )
>>         at <anonymous class>.<anonymous
>> method>(file:///C:/WINDOWS/TEMP/anonymous8800449844697666655webdriver-prof

>> )
>>         at <anonymous class>.<anonymous
>> method>(file:///C:/WINDOWS/TEMP/anonymous8800449844697666655webdriver-prof

>> 21)
>>         at <anonymous class>.<anonymous
>> method>(file:///C:/WINDOWS/TEMP/anonymous8800449844697666655webdriver-prof

>> 26)
>>         at <anonymous class>.<anonymous
>> method>(file:///C:/WINDOWS/TEMP/anonymous8800449844697666655webdriver-prof

Krishnan Mahadevan

unread,
May 17, 2013, 6:53:05 AM5/17/13
to Selenium Users
Karunanidhi,
Can you please help provide the following:

1. Your code that you have so far.
2. The complete html page source of the page in which you are facing this issue ?



Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/

Karunanidhi Ethiraj

unread,
May 17, 2013, 7:22:20 AM5/17/13
to seleniu...@googlegroups.com

Hi Krishna,

 

I have uploaded the source code below .

 

Thanks & Regards,

 

Maritime Leadership. All the way

Karunanidhi  E

Teledata Marine Solutions
M + 91 9994789611

E karuna...@teledatamarine.com

Karunanidhi Ethiraj

unread,
May 17, 2013, 7:23:13 AM5/17/13
to seleniu...@googlegroups.com

Hi Krishana,

 

The HTML code I have uploaded below.

 

 

 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript">
var IsNotificationAvailable = false;
</script>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Ship manager 7.0</title>
    <link rel="stylesheet" type="text/css" href="css/bannercss.css?v=5/9/2013 11:27:09 AM"/>    
    <script language="JavaScript" src="js/milonic_src.js" type="text/javascript"></script>    
    <script language="JavaScript" src="js/sm7alert.js" type="text/javascript"></script>    
    <script language="JavaScript" type="text/javascript">
            if(ns4)_d.write("<scr"+"ipt type=\"text/javascript\" src=js/mmenuns4.js></scr"+"ipt>");
            else _d.write("<scr"+"ipt type=\"text/javascript\" src=js/mmenudom.js></scr"+"ipt>");
    </script>
    <script type="text/javascript" src='js/temp/ygn45z55dj14fw55wjnkxn451c53a32b-ff75-42dc-aa1f-9a2559857cb8_menu_data.js'></script>
    <script type="text/javascript" src='js/js_globals.aspx'></script>
    <script type="text/javascript" src="js/sm7.js" ></script>
    <script type="text/javascript" src="js/SM7AdvancedAjax.js" ></script>
    <script type="text/javascript" src="js/SM7AdvancedPopup.js" ></script>
    <script language="javascript" type="text/javascript" src="http://smdev1:80/office/filter/filterincludes/smpopup.js"></script>
    <script type="text/javascript" language="javascript" src="http://smdev1:80/office/TMSChat/ChatJavascript/ChatRoom.js" ></script>    
    <style type="text/css">
            .chatlist
            {
                font-weight:bold;
                cursor:pointer;
                font-family:Tahoma;
                font-size:x-small;
                color:         #000000;
            }
            .gridNavigator{
            font :10px arial;
                font-weight:bold;
                color: #696969;
                padding: 0px 0px 0px 0px;             
                margin-left: 10px;
                margin-top: 0px;
                margin-right: 0px;
                vertical-align: text-top;
                text-align: right;
                width: 100%;
        }
        SELECT.gridNavigator{
             font-weight:normal;   
             vertical-align:middle;
             font: 10px arial;
             color: #000000;
             padding: 0px 0px 0px 0px;
             margin: 0px 0px 0px 0px;
             text-align: left;
             width: auto;
        }
    </style>
    
    
 
 
    
            
    <script type="text/javascript">   
        var PublicPopUpFiredOn = 3600;   //Convert Into Seconds
        var PublicPopUpShow = 180;    
        
        var PopUpFiredOn = 3600;   //Convert Into Seconds
        var PopUpShow = 180;    
        var ListenSession=window.setTimeout("InvokePopUp()",1000); 
        var ViewSessionTiming;
        var ViewSessionReturnValue;
        var ListenSessionMsg = 0;
        var BrowserName = "firefox";
        function SessionRefresh()
        {
            window.clearTimeout(ListenSession);
            window.clearTimeout(ViewSessionReturnValue);
            window.clearTimeout(ViewSessionTiming);
            document.getElementById("sessionpopupwindow").style.visibility = "hidden";
            PopUpFiredOn = PublicPopUpFiredOn;
            PopUpShow = PublicPopUpShow;
            InvokePopUp();
        }
 
        function InvokePopUp()
        {
            PopUpFiredOn--;
            if(PopUpFiredOn <= 180)
            {
                var getobj = document.getElementById("sessionpopupwindow");
                if(getobj!=null)
                {
                    window.clearTimeout(ListenSession);                    
                    if(window.navigator.appName.toLowerCase() == "microsoft internet explorer")
                    {
                        getobj.style.top = (document.body.offsetHeight/2) - (getobj.offsetHeight/2);
                        getobj.style.left = (document.body.offsetWidth/2) - (getobj.offsetWidth/2);
                    }
                    else
                    {                        
                        getobj.style.top = (window.innerHeight/2) - (getobj.offsetHeight/2) + 'px';
                        getobj.style.left = (window.innerWidth/2) - (getobj.offsetWidth/2) + 'px';
                    }
                    document.getElementById("SessionTiming").innerHTML = PopUpShow;
                    getobj.style.visibility = "visible";            
                    ViewSessionTiming = window.setTimeout("ViewPopUp()",1000); 
                }
            }
            else
            {            
                ListenSession=window.setTimeout("InvokePopUp()",1000);
            }
        }
 
        function ViewPopUp()
        {
            PopUpShow--;
            if(PopUpShow>0)
            {
                document.getElementById("SessionTiming").innerHTML = PopUpShow;
                ViewSessionTiming = window.setTimeout("ViewPopUp()",1000); 
            }
            else
            {            
                document.getElementById("sessionpopupwindow").style.visibility = "hidden";  
                window.clearTimeout(ViewSessionTiming);
                if(confirm("Session Timed Out. Do you want to login again?"))
                    window.location.href = "default.htm";
            }
        }
 
        function InvokeSessionRefreshMsg()
        {
            ListenSessionMsg++;
            if(document.getElementById('SessionMessage').innerHTML != null && document.getElementById('SessionMessage').innerHTML != '')
            {
                SessionRefresh();            
                alert(document.getElementById('SessionMessage').innerHTML);
            }
            else if(ListenSessionMsg >= 2000)
            {
                ListenSessionMsg = 0;
                alert("Session refreshing failed.");        
            }
            else
                ViewSessionReturnValue = setTimeout("InvokeSessionRefreshMsg()",1);
        }
 
        function SessionAlive()
        {
            clearTimeout(ViewSessionTiming);
            document.getElementById('sessionpopupwindow').style.visibility = 'hidden';
            document.getElementById('SessionMessage').innerHTML='';        
            PopulateControl('webfunctions.aspx', 'SESSIONALIVE', '','SessionMessage'); 
            ListenSessionMsg = 0;
            InvokeSessionRefreshMsg();
        }
     
 
        var AlertMessage = new Array();
        var AlertType = new Array();
        var AlertKey = new Array();
        var JSMiniInformation = new Image(); 
        var JSMiniAlert = new Image(); 
        JSMiniInformation.src = "images/Mini_Information.png";
        JSMiniAlert.src = "images/Mini_Alert.png";
        
 
        
 
 
    </script>
 
    
</head>
<body> 
 
<div id="sessionpopupwindow" style="visibility:hidden ;background-color:White ;position: absolute; border-width:1px; border-style:solid; border-color:#C2C2C2;">
    <div style=" background-image:url(images/headerBg.jpg); width:100%"><span style=" font-family:Trebuchet MS, arial; color:#CC3366; font-size:18px; font-weight:bold">Information</span></div>
        <table style="width: 350px;">
            <tr>
                <td width="80px">
                    <img border="0" src="filter/filterincludes/images/alert_micon.png" />
                </td>
                <td id="errmsgs">
                    <div style="font-family:Arial; font-size:12px" class="message"><br />Session will be terminated with in&nbsp;<b style="color:Red" id="SessionTiming"></b>&nbsp;seconds. </br> Do you wish to maintain current session?</div>
                </td>
            </tr>
            <tr height="14px">
                <td>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    <div style="visibility:hidden" id="SessionMessage"></div>
                    
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <img src ="images/complete.gif" style="cursor:pointer" onclick = "javascript:SessionAlive()"/>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <img src ="images/cancelREQ.gifstyle="cursor:pointer" onclick = "javascript:window.clearTimeout(ListenSession);window.clearTimeout(ViewSessionReturnValue);window.clearTimeout(ViewSessionTiming);document.getElementById('sessionpopupwindow').style.visibility = 'hidden'"/>
                    
                </td>
            </tr>
        </table>
        <br />
    </div>
 
 
  
 
        <input type="hidden" id="hidTreeCode" name="hidTreeCode" />
        <input type="hidden" id="hidVesselName" name="hidVesselName" />
    <table class="masterpagetable" border="0" width="100%">
        <tr id="BannerId" >
            <td id="banner" class="masterpagetable">
                <!-- BANNER START -->
                <table class="banner" cellpadding="0" cellspacing="0" border="0" hspace="0" vspace="0">
                    <tr>
                        <td colspan="3"  >
                        <div style=" margin:2px 2px 2px 2px">
                        <table style=" width:100%" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                        <td style=" text-align:left; font-family:Arial; font-size:11px; width:1px; vertical-align:middle;">
                        <img src="images/SMlogo.png" /><br />&nbsp;&nbsp;&nbsp;DB&nbsp;Version&nbsp;:&nbsp;0.1847
                        </td>
                        <td style="text-align:center; color:#541120; font: 12px Verdana;">
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <b>TMS SHIPPING PVT LTD</b><br />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                     OFFICE
                                                     
                        </td>
                        <td style="width:310px">
                        <table style=" width:450px; text-align:right">
                        <tr>
                        <td style=" font-family:Arial; font-size:10px; font-weight:bold">
                        Change Entity&nbsp;&nbsp;<select onchange="javascript:var frm = document.frmEC;frm.cmbEntity.value=this.value;frm.hidURL.value = document.getElementById('iframecontentpanel').src;AddNew(frm);" name=cmbEntity id=cmbEntity class=BannerSelect><option value=0 selected>OFFICE</option><option value=3>·····TMS ATLAS LAGOON</option><option value=1>·····TMS BLUE STAR</option><option value=2>·····TMS MORNING STAR</option></select>
                        </td>
                        </tr>
                        <tr>
                        <td  style=" font-family:Arial; font-size:10px; font-weight:bold">
                        
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a  style="color:Gray;" onmouseover="this.style.color='black'" onmouseout="this.style.color='gray'" href="logout.aspx">Logout</a>&nbsp;&nbsp;&nbsp;
                          
                        
                        </td>
                        </tr>
                        </table>
                        </td>
 
                        </tr>
 
                        </table>
                        </div>
                        </td>                        
                    </tr>
                    
                    
                    
                    
                    
                    
                    
                
                <!-- BANNER END -->
 
              
 
 
            </td>
        </tr>
        <tr>
            <td  class="menu" COLSPAN=3>
                               <table width="100%" border="0" cellspacing="0" cellpadding="0" >
                                      <tr>
                                              <td width="53%">
                        
                                              <script type="text/javascript">
                                                  drawMenus();
                                              </script>
                        
                                              </td>
                                              <td width="47%" align="right" class="breadcrumb" style="text-align:right; color:White; vertical-align:middle; padding-right:5px">
                        <span >
                                                     Welcome,&nbsp;ADMINISTRATOR  SYSTEM.&nbsp;&nbsp;You have logged on&nbsp;:&nbsp;17/May/2013 04:51:07 PM
                            </span>
                                              </td>
                                      </tr>
                               </table>
            </td>
        </tr>
        <tr id="middlerow">
            <td class="contentpanel" id="contentpanel" width="98%"  COLSPAN=3>
                <!-- CONTENT START -->
                <iframe onload="SessionRefresh()" id="iframecontentpanel" name="iframecontentpanel" class="contentpanel maximizecontentpanel" src="dashboard/shipmanagerdashboard.aspx"
                    frameborder="0"></iframe>
                <!-- CONTENT END -->
            </td>
        </tr>
        <tr id="footerrow">
            <td id="footer"  COLSPAN=3>
                <div class="footer" style="width:49%;text-align:right;float:right;">Copyright © 2008 Teledata Marine Solutions. All rights reserved.</div>
                               <div class="footer ftbold" style="width:49%;text-align:left;">&nbsp;</div>
            </td>
        </tr>
    </table>
    <!-- This is form is used for parameter recording to populate the combobox in the tree -->
    <form id="frmTreeLoad" name="frmTreeLoad" action="http://smdev1:80/office/inventory/componenttreexml.aspx" target="ifrTree" method="post">        
        <input type="hidden" name="hidParameterCategoryCode" id="hidParameterCategoryCode" value="1" />
        <input type="hidden" name="hidEntityCode" value="0" />
        <input type="hidden" name="hidURLReferer" value="" />
        <input type="hidden" name="hidEntityType" value="0" />
        <input type="hidden" name="submitted" value="1" />
        <input type="hidden" name="formaction" value="form_tree_load" />
    </form
    <script language="javascript" type="text/javascript">
                       window.onresize();
    </script>
    <form name="frmEC" id="frmEC" target="iframecontentpanel" method="post" action="http://smdev1:80/office/loginsubmit.aspx">
        <input type="hidden" name="cmbEntity" value=""/>
        <input type="hidden" name="hidURL" value=""/>
        <input type="hidden" name="submitted" value="1" />
        <input type="hidden" name="formaction" value="entitychangesubmit" />
    </form>
 
 
 
 
</body>
</html>
 

 

 

 

Thanks & Regards,

 

Maritime Leadership. All the way

Karunanidhi  E

Teledata Marine Solutions
M + 91 9994789611

E karuna...@teledatamarine.com

 

Mark Collin

unread,
May 17, 2013, 7:30:41 AM5/17/13
to seleniu...@googlegroups.com
I would check your HTML again, because what you have posted doesn't have an element with an ID of "mmlink1", I refer you to my previous statement:


The error is that the element you are locating using the id "mmlink1" does not exist on your page when you try to find it.


<
/font>

Karunanidhi Ethiraj

unread,
May 17, 2013, 7:51:23 AM5/17/13
to seleniu...@googlegroups.com

Hi Krishana/ Mark

 

I have updated the exact element id on below.

 

 

<a style="line-height: normal; background: none repeat scroll 0% 0% transparent; text-decoration: none; height: 25px; width: 199px; overflow: hidden; position: absolute; visibility: hidden; z-index: 1; top: 0px; left: 0px;" onmouseover="return $L(this._itemRef)" onmouseout="_mot=setTimeout('k$(this._itemRef)',99)" onclick="return $K(this._itemRef)" href="javascript:void(0)" id="mmlink1" name="mM1" title="" target=""></a>

 

 

Thanks & Regards,

 

Maritime Leadership. All the way

Karunanidhi  E

Teledata Marine Solutions
M + 91 9994789611

E karuna...@teledatamarine.com

 

To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/519614E1.6040703%40lazeryattack.com?hl=en-US.

Mark Collin

unread,
May 17, 2013, 8:00:03 AM5/17/13
to seleniu...@googlegroups.com
For a start that element is not visible, Selenium cannot interact with elements that are not visbile (just like a user can't).  Secondly the anchor is not anchoring anything, this looks like bad HTML in my mind.

Finally that snippet of HTML wasn't in your original page, where did it come from?

Karunanidhi Ethiraj

unread,
May 17, 2013, 8:12:42 AM5/17/13
to seleniu...@googlegroups.com

Hi

 

This is an invisible second element, when we on click on the first element then the second element will getting display.

 ;<

Mark Collin

unread,
May 17, 2013, 8:19:45 AM5/17/13
to seleniu...@googlegroups.com
So to reiterate it yet again:


The error is that the element you are locating using the id "mmlink1" does not exist on your page when you try to find it.

You will need to use an explicit wait to make sure the element is there and visible before you try to interact with it, Something like:

WebDriverWait wait = new WebDriverWait(driver, 100, 15);
wait.until(ExpectedConditions.visibilityOfElementLocatedBy(By.id("mmlink1"));

The above snippet is produced from memory so there may be some minor errors in syntax or function name, but you should be able to work it out from that.

Karunanidhi Ethiraj

unread,
May 17, 2013, 8:46:59 AM5/17/13
to seleniu...@googlegroups.com

Hi mark

 

Thanks for reply.

 

I will check and let you know.

To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/51962061.1090702%40lazeryattack.com?hl=en-US.

Karunanidhi Ethiraj

unread,
May 17, 2013, 1:12:20 PM5/17/13
to seleniu...@googlegroups.com
Hi mark

I have tried below code, but there is no positive.


what is the command for mouse over?


Thanks & Regards,

Maritime Leadership. All the way

Karunanidhi E

Teledata Marine Solutions
T + 91 44 4220 7000
F + 91 44 42207051
M + 91 9994789611
E karuna...@teledatamarine.com
W teledatamarine.com

________________________________________
From: seleniu...@googlegroups.com [seleniu...@googlegroups.com] On Behalf Of Karunanidhi Ethiraj
Sent: Friday, May 17, 2013 6:16 PM
To: seleniu...@googlegroups.com
Subject: RE: [selenium-users] RGD: Unable to locate element: {"method":"id","selector":"mmlink1"}
E karuna...@teledatamarine.com<mailto:karuna...@teledatamarine.com>

________________________________
From: seleniu...@googlegroups.com<mailto:seleniu...@googlegroups.com> [mailto:seleniu...@googlegroups.com<mailto:seleniu...@googlegroups.com>] On Behalf Of Mark Collin
Sent: Friday, May 17, 2013 5:30 PM
To: seleniu...@googlegroups.com<mailto:seleniu...@googlegroups.com>
Subject: Re: [selenium-users] RGD: Unable to locate element: {"method":"id","selector":"mmlink1"}

For a start that element is not visible, Selenium cannot interact with elements that are not visbile (just like a user can't). Secondly the anchor is not anchoring anything, this looks like bad HTML in my mind.

Finally that snippet of HTML wasn't in your original page, where did it come from?
On 17/05/2013 12:51, Karunanidhi Ethiraj wrote:
Hi Krishana/ Mark

I have updated the exact element id on below.


<a style="line-height: normal; background: none repeat scroll 0% 0% transparent; text-decoration: none; height: 25px; width: 199px; overflow: hidden; position: absolute; visibility: hidden; z-index: 1; top: 0px; left: 0px;" onmouseover="return $L(this._itemRef)" onmouseout="_mot=setTimeout('k$(this._itemRef)',99)" onclick="return $K(this._itemRef)" href="javascript:void(0)"<javascript:void(0)> id="mmlink1" name="mM1" title="" target=""></a>


Thanks & Regards,

Maritime Leadership. All the way
Karunanidhi E
Teledata Marine Solutions
M + 91 9994789611

E karuna...@teledatamarine.com<mailto:karuna...@teledatamarine.com>

________________________________
From: seleniu...@googlegroups.com<mailto:seleniu...@googlegroups.com> [mailto:seleniu...@googlegroups.com<mailto:seleniu...@googlegroups.com>] On Behalf Of Mark Collin
Sent: Friday, May 17, 2013 5:01 PM
To: seleniu...@googlegroups.com<mailto:seleniu...@googlegroups.com>
Subject: Re: [selenium-users] RGD: Unable to locate element: {"method":"id","selector":"mmlink1"}

I would check your HTML again, because what you have posted doesn't have an element with an ID of "mmlink1", I refer you to my previous statement:

The error is that the element you are locating using the id "mmlink1" does not exist on your page when you try to find it.



On 17/05/2013 12:23, Karunanidhi Ethiraj wrote:
Hi Krishana,

The HTML code I have uploaded below.







<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"<http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>>

<html xmlns="http://www.w3.org/1999/xhtml"<http://www.w3.org/1999/xhtml>>

<head>

<script type="text/javascript">

var IsNotificationAvailable = false;

</script>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>Ship manager 7.0</title>

<link rel="stylesheet" type="text/css" href="css/bannercss.css?v=5/9/2013 11:27:09 AM<view-source:http://smdev1/office/css/bannercss.css?v=5/9/2013%2011:27:09%20AM>"/>

<script language="JavaScript" src="js/milonic_src.js<view-source:http://smdev1/office/js/milonic_src.js>" type="text/javascript"></script>

<script language="JavaScript" src="js/sm7alert.js<view-source:http://smdev1/office/js/sm7alert.js>" type="text/javascript"></script>

<script language="JavaScript" type="text/javascript">

if(ns4)_d.write("<scr"+"ipt type=\"text/javascript\" src=js/mmenuns4.js></scr"+"ipt>");

else _d.write("<scr"+"ipt type=\"text/javascript\" src=js/mmenudom.js></scr"+"ipt>");

</script>

<script type="text/javascript" src='js/temp/ygn45z55dj14fw55wjnkxn451c53a32b-ff75-42dc-aa1f-9a2559857cb8_menu_data.js<view-source:http://smdev1/office/js/temp/ygn45z55dj14fw55wjnkxn451c53a32b-ff75-42dc-aa1f-9a2559857cb8_menu_data.js>'></script>

<script type="text/javascript" src='js/js_globals.aspx<view-source:http://smdev1/office/js/js_globals.aspx>'></script>

<script type="text/javascript" src="js/sm7.js<view-source:http://smdev1/office/js/sm7.js>" ></script>

<script type="text/javascript" src="js/SM7AdvancedAjax.js<view-source:http://smdev1/office/js/SM7AdvancedAjax.js>" ></script>

<script type="text/javascript" src="js/SM7AdvancedPopup.js<view-source:http://smdev1/office/js/SM7AdvancedPopup.js>" ></script>

<script language="javascript" type="text/javascript" src="http://smdev1:80/office/filter/filterincludes/smpopup.js<view-source:http://smdev1/office/filter/filterincludes/smpopup.js>"></script>

<script type="text/javascript" language="javascript" src="http://smdev1:80/office/TMSChat/ChatJavascript/ChatRoom.js<view-source:http://smdev1/office/TMSChat/ChatJavascript/ChatRoom.js>" ></script>
<img border="0" src="filter/filterincludes/images/alert_micon.png<view-source:http://smdev1/office/filter/filterincludes/images/alert_micon.png>" />

</td>

<td id="errmsgs">

<div style="font-family:Arial; font-size:12px" class="message"><br />Session will be terminated with in&nbsp;<b style="color:Red" id="SessionTiming"></b>&nbsp;seconds. </br> Do you wish to maintain current session?</div>



</td>

</tr>

<tr height="14px">

<td>

</td>

<td>

</td>

</tr>

<tr>

<td>

</td>

<td>

<div style="visibility:hidden" id="SessionMessage"></div>



&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<img src ="images/complete.gif<view-source:http://smdev1/office/images/complete.gif>" style="cursor:pointer" onclick = "javascript:SessionAlive()"<javascript:SessionAlive()>/>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<img src ="images/cancelREQ.gif<view-source:http://smdev1/office/images/cancelREQ.gif>" style="cursor:pointer" onclick = "javascript:window.clearTimeout(ListenSession);window.clearTimeout(ViewSessionReturnValue);window.clearTimeout(ViewSessionTiming);document.getElementById('sessionpopupwindow').style.visibility = 'hidden'"<javascript:window.clearTimeout(ListenSession);window.clearTimeout(ViewSessionReturnValue);window.clearTimeout(ViewSessionTiming);document.getElementById('sessionpopupwindow').style.visibility='hidden'>

/>

;<

/font>



</td>

</tr>

</table>

<br />

</div>









<input type="hidden" id="hidTreeCode" name="hidTreeCode" />

<input type="hidden" id="hidVesselName" name="hidVesselName" />

<table class="masterpagetable" border="0" width="100%">

<tr id="BannerId" >

<td id="banner" class="masterpagetable">

<!-- BANNER START -->

<table class="banner" cellpadding="0" cellspacing="0" border="0" hspace="0" vspace="0">

<tr>

<td colspan="3" >

<div style=" margin:2px 2px 2px 2px">

<table style=" width:100%" border="0" cellpadding="0" cellspacing="0">

<tr>

<td style=" text-align:left; font-family:Arial; font-size:11px; width:1px; vertical-align:middle;">

<img src="images/SMlogo.png<view-source:http://smdev1/office/images/SMlogo.png>" /><br />&nbsp;&nbsp;&nbsp;DB&nbsp;Version&nbsp;:&nbsp;0.1847

</td>

<td style="text-align:center; color:#541120; font: 12px Verdana;">

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<b>TMS SHIPPING PVT LTD</b><br />

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

OFFICE



</td>

<td style="width:310px">

<table style=" width:450px; text-align:right">

<tr>

<td style=" font-family:Arial; font-size:10px; font-weight:bold">

Change Entity&nbsp;&nbsp;<select onchange="javascript:var frm = document.frmEC;frm.cmbEntity.value=this.value;frm.hidURL.value = document.getElementById('iframecontentpanel').src;AddNew(frm);"<javascript:varfrm=document.frmEC;frm.cmbEntity.value=this.value;frm.hidURL.value=document.getElementById('iframecontentpanel').src;AddNew(frm);> name=cmbEntity id=cmbEntity class=BannerSelect><option value=0

selected>OFFICE</option><option value=3>*****TMS ATLAS LAGOON</option><option value=1>*****TMS BLUE STAR</option><option value=2>*****TMS MORNING STAR</option></select>

</td>

</tr>

<tr>

<td style=" font-family:Arial; font-size:10px; font-weight:bold">



&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a style="color:Gray;" onmouseover="this.style.color='black'" onmouseout="this.style.color='gray'" href="logout.aspx<view-source:http://smdev1/office/logout.aspx>">Logout</a>&nbsp;&nbsp;&nbsp;
<iframe onload="SessionRefresh()" id="iframecontentpanel" name="iframecontentpanel" class="contentpanel maximizecontentpanel" src="dashboard/shipmanagerdashboard.aspx<view-source:http://smdev1/office/dashboard/shipmanagerdashboard.aspx>"

frameborder="0"></iframe>

<!-- CONTENT END -->

</td>

</tr>

<tr id="footerrow">

<td id="footer" COLSPAN=3>

<div class="footer" style="width:49%;text-align:right;float:right;">Copyright (c) 2008 Teledata Marine Solutions. All rights reserved.</div>

<div class="footer ftbold" style="width:49%;text-align:left;">&nbsp;</div>

</td>

</tr>

</table>

<!-- This is form is used for parameter recording to populate the combobox in the tree -->

<form id="frmTreeLoad" name="frmTreeLoad" action="http://smdev1:80/office/inventory/componenttreexml.aspx<view-source:http://smdev1/office/inventory/componenttreexml.aspx>" target="ifrTree" method="post">

<input type="hidden" name="hidParameterCategoryCode" id="hidParameterCategoryCode" value="1" />

<input type="hidden" name="hidEntityCode" value="0" />

<input type="hidden" name="hidURLReferer" value="" />

<input type="hidden" name="hidEntityType" value="0" />

<input type="hidden" name="submitted" value="1" />

<input type="hidden" name="formaction" value="form_tree_load" />

</form>

<script language="javascript" type="text/javascript">

window.onresize();

</script>

<form name="frmEC" id="frmEC" target="iframecontentpanel" method="post" action="http://smdev1:80/office/loginsubmit.aspx<view-source:http://smdev1/office/loginsubmit.aspx>">

<input type="hidden" name="cmbEntity" value=""/>

<input type="hidden" name="hidURL" value=""/>

<input type="hidden" name="submitted" value="1" />

<input type="hidden" name="formaction" value="entitychangesubmit" />

</form>









</body>

</html>





Thanks & Regards,

Maritime Leadership. All the way
Karunanidhi E
Teledata Marine Solutions
M + 91 9994789611

E karuna...@teledatamarine.com<mailto:karuna...@teledatamarine.com>

________________________________
From: seleniu...@googlegroups.com<mailto:seleniu...@googlegroups.com> [mailto:seleniu...@googlegroups.com<mailto:seleniu...@googlegroups.com>] On Behalf Of Krishnan Mahadevan
Sent: Friday, May 17, 2013 4:23 PM
To: Selenium Users
Subject: Re: [selenium-users] RGD: Unable to locate element: {"method":"id","selector":"mmlink1"}

Karunanidhi,
Can you please help provide the following:

1. Your code that you have so far.
2. The complete html page source of the page in which you are facing this issue ?



Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/

On Fri, May 17, 2013 at 4:22 PM, Karunanidhi Ethiraj <karuna...@teledatamarine.com<mailto:karuna...@teledatamarine.com>> wrote:
Hi Avikash Gorka


Actually this is the mouse over link. Am not aware about this plz provide correct code for this.


Thanks & Regards,

Maritime Leadership. All the way
Karunanidhi E
Teledata Marine Solutions
M + 91 9994789611<tel:%2B%C2%A091%C2%A09994789611>

E karuna...@teledatamarine.com<mailto:karuna...@teledatamarine.com>

________________________________
From: seleniu...@googlegroups.com<mailto:seleniu...@googlegroups.com> [mailto:seleniu...@googlegroups.com<mailto:seleniu...@googlegroups.com>] On Behalf Of Avikash Gorka
Sent: Friday, May 17, 2013 4:00 PM
To: Selenium Users

Subject: Re: [selenium-users] RGD: Unable to locate element: {"method":"id","selector":"mmlink1"}

try selecting that parent frame again before clicking on the mmlink1.
May be you are loosing frame at runtime.

driver.switchTo().frame("fraSM");
driver.findElement(By.id("mmlink0")).click();

driver.findElement(By.id("mmlink1")).click();
driver.findElement(By.id("mmlink3")).click();

Thanks & Regards,
Avikash Gorka
Sr Test Engineer


On Fri, May 17, 2013 at 1:54 PM, Karunanidhi Ethiraj <karuna...@teledatamarine.com<mailto:karuna...@teledatamarine.com>> wrote:
Ya sure............friend


Thanks & Regards,

Maritime Leadership. All the way
Karunanidhi E
Teledata Marine Solutions
M + 91 9994789611<tel:%2B%C2%A091%C2%A09994789611>

E karuna...@teledatamarine.com<mailto:karuna...@teledatamarine.com>

________________________________
From: Ugo Morin [mailto:lorda...@gmail.com<mailto:lorda...@gmail.com>]
Sent: Friday, May 17, 2013 1:48 PM
To: seleniu...@googlegroups.com<mailto:seleniu...@googlegroups.com>
Cc: Karunanidhi Ethiraj

Subject: Re: [selenium-users] RGD: Unable to locate element: {"method":"id","selector":"mmlink1"}

Thank you to let me know if you find the solution


Le vendredi 17 mai 2013 10:18:20 UTC+2, Karunanidhi Ethiraj a ?crit :
Yes I have facing this issue last couple of weeks but no positive ....result still am trying.


Thanks & Regards,

Maritime Leadership. All the way
Karunanidhi E
Teledata Marine Solutions
M + 91 9994789611<tel:%2B%C2%A091%C2%A09994789611>

E karuna...@teledatamarine.com<mailto:karuna...@teledatamarine.com>

________________________________
From: seleniu...@googlegroups.com<mailto:seleniu...@googlegroups.com> [mailto:seleniu...@googlegroups.com<mailto:seleniu...@googlegroups.com>] On Behalf Of Ugo Morin
Sent: Friday, May 17, 2013 1:38 PM
To: seleniu...@googlegroups.com<mailto:seleniu...@googlegroups.com>
Subject: Re: [selenium-users] RGD: Unable to locate element: {"method":"id","selector":"mmlink1"}

I have the same problem, and I think we are not in the good frame, because i'm sure that name is correct :

driver.findElement(By.xpath("//table[@id='listecoll']/tbody/tr[2]/td[6]/a")).click();
driver.switchTo().frame(nomFrame);
driver.findElement(By.linkText("Consommations")).click();
driver.findElement(By.linkText("Engagement")).click();
driver.findElement(By.xpath("(//a[contains(text(),'D?pense')])[13]")).click();

nomFrame = "coriolisFrame";
selenium.highlight(nomFrame);
selenium.selectFrame(nomFrame);
//driver.switchTo().defaultContent();

System.out.println(nomFrame);

driver.findElement(By.id("CHAPCOD")).clear();
driver.findElement(By.id("CHAPCOD")).sendKeys("011");

But, i don't know why Selenium does not switch in that frame

Le vendredi 17 mai 2013 09:58:06 UTC+2, Mark Collin a ?crit :
Not when Selenium is trying to find it it's not.

You either need to use an explicit wait to give the page time to render
it, or you are in the wrong frame/window.

On 17/05/2013 08:37, Karunanidhi Ethiraj wrote:
> Hi mark
>
> That specified element is available.
>
>
> Thanks & Regards,
>
> Maritime Leadership. All the way
> Karunanidhi E
> Teledata Marine Solutions
> M + 91 9994789611<tel:%2B%2091%209994789611>
> E karuna...@teledatamarine.com<mailto:karuna...@teledatamarine.com>
>
>
> -----Original Message-----
> From: seleniu...@googlegroups.com<mailto:seleniu...@googlegroups.com> [mailto:seleniu...@<mailto:seleniu...@>googlegroups.com<http://googlegroups.com>] On Behalf Of Mark Collin
> Sent: Friday, May 17, 2013 1:01 PM
> To: seleniu...@googlegroups.com<mailto:seleniu...@googlegroups.com>
> Subject: Re: [selenium-users] RGD: Unable to locate element: {"method":"id","selector":"mmlink1"}
>
> The error is that the element you are locating using the id "mmlink1"
> does not exist on your page when you try to find it.
>
>
>
> On 16/05/2013 17:11, Karunanidhi Ethiraj wrote:
>> Hi All
>>
>> i have given below the code which is thought the error.
>>
>>
>> CODE:
>>
>>
>> import org.openqa.selenium.By<http://org.openqa.selenium.By>;
>> System info: os.name<http://os.name>: 'Windows XP', os.arch: 'x86', os.version: '5.1',
>> at org.openqa.selenium.By<http://org.openqa.selenium.By>$ById.findElement(By.java:216)
>> at
>> org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.jav
>> a:299)
>> at Admin.main(Admin.java:46)
>> Caused by: org.openqa.selenium.remote.ErrorHandler$UnknownServerException:
>> Unable to locate element: {"method":"id","selector":"mmlink1"}
>> Build info: version: '2.32.0', revision: '6c40c18', time: '2013-04-09
>> 17:23:22'
>> System info: os.name<http://os.name>: 'Windows XP', os.arch: 'x86', os.version: '5.1',
>> java.version: '1.7.0_21'
>> Driver info: driver.version: unknown
>> at <anonymous class>.<anonymous
>> method>(file:///C:/WINDOWS/TEMP/anonymous8800449844697666655webdriver-prof<file:///C:%5CWINDOWS%5CTEMP%5Canonymous8800449844697666655webdriver-prof>
>> ile/extensions/fxdr...@googlecode.com/components/driver_component.js:8405<http://fxdr...@googlecode.com/components/driver_component.js:8405>
>> )
>> at <anonymous class>.<anonymous
>> method>(file:///C:/WINDOWS/TEMP/anonymous8800449844697666655webdriver-prof<file:///C:%5CWINDOWS%5CTEMP%5Canonymous8800449844697666655webdriver-prof>
>> ile/extensions/fxdr...@googlecode.com/components/driver_component.js:8414<http://fxdr...@googlecode.com/components/driver_component.js:8414>
>> )
>> at <anonymous class>.<anonymous
>> method>(file:///C:/WINDOWS/TEMP/anonymous8800449844697666655webdriver-prof<file:///C:%5CWINDOWS%5CTEMP%5Canonymous8800449844697666655webdriver-prof>
>> ile/extensions/fxdr...@googlecode.com/components/command_processor.js:104<http://fxdr...@googlecode.com/components/command_processor.js:104>
>> 21)
>> at <anonymous class>.<anonymous
>> method>(file:///C:/WINDOWS/TEMP/anonymous8800449844697666655webdriver-prof<file:///C:%5CWINDOWS%5CTEMP%5Canonymous8800449844697666655webdriver-prof>
>> ile/extensions/fxdr...@googlecode.com/components/command_processor.js:104<http://fxdr...@googlecode.com/components/command_processor.js:104>
>> 26)
>> at <anonymous class>.<anonymous
>> method>(file:///C:/WINDOWS/TEMP/anonymous8800449844697666655webdriver-prof<file:///C:%5CWINDOWS%5CTEMP%5Canonymous8800449844697666655webdriver-prof>
>> ile/extensions/fxdr...@googlecode.com/components/command_processor.js:103<http://fxdr...@googlecode.com/components/command_processor.js:103>
>> 66)
>>
>>
>>
>>
>>
>>
>>
>> Thanks & Regards,
>>
>> Maritime Leadership. All the way
>>
>> Karunanidhi E
>>
>> Teledata Marine Solutions
>> T + 91 44 4220 7000<tel:%2B%2091%2044%204220%207000>
>> F + 91 44 42207051<tel:%2B%2091%2044%2042207051>
>> M + 91 9994789611<tel:%2B%2091%209994789611>
>> E karuna...@teledatamarine.com<mailto:karuna...@teledatamarine.com>
>> W teledatamarine.com<http://teledatamarine.com>
>>
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com<mailto:selenium-user...@googlegroups.com>.
To post to this group, send email to seleniu...@googlegroups.com<mailto:seleniu...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/34c5da71-f5c4-4a1f-8118-8c580a15300d%40googlegroups.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com<mailto:selenium-users%2Bunsu...@googlegroups.com>.
To post to this group, send email to seleniu...@googlegroups.com<mailto:seleniu...@googlegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com<mailto:selenium-users%2Bunsu...@googlegroups.com>.
To post to this group, send email to seleniu...@googlegroups.com<mailto:seleniu...@googlegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com<mailto:selenium-users%2Bunsu...@googlegroups.com>.
To post to this group, send email to seleniu...@googlegroups.com<mailto:seleniu...@googlegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com<mailto:selenium-user...@googlegroups.com>.
To post to this group, send email to seleniu...@googlegroups.com<mailto:seleniu...@googlegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com<mailto:selenium-user...@googlegroups.com>.
To post to this group, send email to seleniu...@googlegroups.com<mailto:seleniu...@googlegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.






--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com<mailto:selenium-user...@googlegroups.com>.
To post to this group, send email to seleniu...@googlegroups.com<mailto:seleniu...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/519614E1.6040703%40lazeryattack.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com<mailto:selenium-user...@googlegroups.com>.
To post to this group, send email to seleniu...@googlegroups.com<mailto:seleniu...@googlegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.





--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com<mailto:selenium-user...@googlegroups.com>.
To post to this group, send email to seleniu...@googlegroups.com<mailto:seleniu...@googlegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com<mailto:selenium-user...@googlegroups.com>.
To post to this group, send email to seleniu...@googlegroups.com<mailto:seleniu...@googlegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.





--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/51962061.1090702%40lazeryattack.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.



Karunanidhi Ethiraj

unread,
May 17, 2013, 2:06:39 PM5/17/13
to seleniu...@googlegroups.com
Hi krishana/Mark/ARk--- and others



I am hereby attached the navigation path. please give me the correct code.





Thanks & Regards,

Maritime Leadership. All the way

Karunanidhi E

Teledata Marine Solutions
T + 91 44 4220 7000
F + 91 44 42207051
M + 91 9994789611
E karuna...@teledatamarine.com
W teledatamarine.com

________________________________________
From: seleniu...@googlegroups.com [seleniu...@googlegroups.com] On Behalf Of Karunanidhi Ethiraj
Sent: Friday, May 17, 2013 10:42 PM
admin page.bmp

Karunanidhi Ethiraj

unread,
May 20, 2013, 1:30:52 AM5/20/13
to seleniu...@googlegroups.com

Hi krishana/Mark/ARk--- and others



I am hereby attached the navigation path. please give me the correct code.


Thanks & Regards,

Maritime Leadership. All the way
Karunanidhi E
Teledata Marine Solutions

Krishnan Mahadevan

unread,
May 20, 2013, 1:36:00 AM5/20/13
to Selenium Users
We seem to be going around in circles on this issue.
For anyone to help you out, you would need to furnish the complete html page source of the page in question which in your case you are not doing so [ Your web page seems to have multiple frames/iframes and you are not giving the html source of those iframes/frames]

So here's what I will suggest that you do on your own [ Darrell suggests this approach a lot of times and I see a lot of sense in it as well]

After you have opened up your page via WebDriver, try printing the page source for every iframe/frame that is available in your page and manually try searching for the element that you are looking for using [textpad/wordpad etc.,]. This should help you identify as to what is the iframe/frame in which your element is present. 
Once you figured out the iframe/frame, you can then remove all of the debugging steps [printing the pagesource] and merely switch to that frame/iframe and work with your element in question.





Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/


Karunanidhi Ethiraj

unread,
May 20, 2013, 2:03:02 AM5/20/13
to seleniu...@googlegroups.com
Hi Krishnan,
 
I have provide the HTML source code on below .
 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<script type="text/javascript">
var IsNotificationAvailable = false;
</script>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>ShipManager 7.0</title>
    <link rel="stylesheet" type="text/css" href="css/bannercss.css?v=3/16/2013 4:16:40 PM"/>    
    <script language="JavaScript" src="js/milonic_src.js" type="text/javascript"></script>    
    <script language="JavaScript" src="js/sm7alert.js" type="text/javascript"></script>    
    <script language="JavaScript" type="text/javascript">
            if(ns4)_d.write("<scr"+"ipt type=\"text/javascript\" src=js/mmenuns4.js></scr"+"ipt>");
            else _d.write("<scr"+"ipt type=\"text/javascript\" src=js/mmenudom.js></scr"+"ipt>");
    </script>
    <script type="text/javascript" src='js/temp/33wcoiqk05dazt55qibqvtbh7eceef95-937f-4b85-86d1-dec2e384e7e4_menu_data.js'></script>
    <script type="text/javascript" src='js/js_globals.aspx'></script>
    <script type="text/javascript" src="js/sm7.js" ></script>
    <script type="text/javascript" src="js/SM7AdvancedAjax.js" ></script>
    <script type="text/javascript" src="js/SM7AdvancedPopup.js" ></script>
    <script language="javascript" type="text/javascript" src="http://localhost/sm7/filter/filterincludes/smpopup.js"></script>
    <script type="text/javascript" language="javascript" src="http://localhost/sm7/TMSChat/ChatJavascript/ChatRoom.js" ></script>    
        var PublicPopUpShow = 60;    
        
        var PopUpFiredOn = 3600;   //Convert Into Seconds
        var PopUpShow = 60;    
        var ListenSession=window.setTimeout("InvokePopUp()",1000); 
        var ViewSessionTiming;
        var ViewSessionReturnValue;
        var ListenSessionMsg = 0;
        var BrowserName = "firefox";
        function SessionRefresh()
        {
            window.clearTimeout(ListenSession);
            window.clearTimeout(ViewSessionReturnValue);
            window.clearTimeout(ViewSessionTiming);
            document.getElementById("sessionpopupwindow").style.visibility = "hidden";
            PopUpFiredOn = PublicPopUpFiredOn;
            PopUpShow = PublicPopUpShow;
            InvokePopUp();
        }
 
        function InvokePopUp()
        {
            PopUpFiredOn--;
            if(PopUpFiredOn <= 60)
                    <img border="0" src="filter/filterincludes/images/alert_micon.png" />
                </td>
                <td id="errmsgs">
                    <div style="font-family:Arial; font-size:12px" class="message"><br />Session will be terminated with in&nbsp;<b style="color:Red" id="SessionTiming"></b>&nbsp;seconds. </br> Do you wish to maintain current session?</div>
                </td>
            </tr>
            <tr height="14px">
                <td>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    <div style="visibility:hidden" id="SessionMessage"></div>
                    
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <img src ="images/complete.gif" style="cursor:pointer" onclick = "javascript:SessionAlive()"/>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <img src ="images/cancelREQ.gifstyle="cursor:pointer" onclick = "javascript:window.clearTimeout(ListenSession);window.clearTimeout(ViewSessionReturnValue);window.clearTimeout(ViewSessionTiming);document.getElementById('sessionpopupwindow').style.visibility = 'hidden'"/>
                    
                </td>
            </tr>
        </table>
        <br />
    </div>
 
 
  
 
        <input type="hidden" id="hidTreeCode" name="hidTreeCode" />
        <input type="hidden" id="hidVesselName" name="hidVesselName" />
    <table class="masterpagetable" border="0" width="100%">
        <tr id="BannerId" >
            <td id="banner" class="masterpagetable">
                <!-- BANNER START -->
                <table class="banner" cellpadding="0" cellspacing="0" border="0" hspace="0" vspace="0">
                    <tr>
                        <td colspan="3"  >
                        <div style=" margin:2px 2px 2px 2px">
                        <table style=" width:100%" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                        <td style=" text-align:left; font-family:Arial; font-size:11px; width:1px; vertical-align:middle;">
                        <img src="images/SMlogo.png" /><br />&nbsp;&nbsp;&nbsp;DB&nbsp;Version&nbsp;:&nbsp;0.1848
                        </td>
                        <td style="text-align:center; color:#541120; font: 12px Verdana;">
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <b>HONG LAM MARINE PTE LTD</b><br />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                     OFFICE
                                                     
                        </td>
                        <td style="width:310px">
                        <table style=" width:450px; text-align:right">
                        <tr>
                        <td style=" font-family:Arial; font-size:10px; font-weight:bold">
                        Change Entity&nbsp;&nbsp;<select onchange="javascript:var frm = document.frmEC;frm.cmbEntity.value=this.value;frm.hidURL.value = document.getElementById('iframecontentpanel').src;AddNew(frm);" name=cmbEntity id=cmbEntity class=BannerSelect><option value=0 selected>OFFICE</option><option value=14>·····BEYOND</option><option value=5>·····DEBONAIR</option><option value=20>·····DELPHINE</option><option value=21>·····DEMURE</option><option value=37>·····DESTINE</option><option value=15>·····EAGER</option><option value=6>·····EMISSARY</option><option value=16>·····EMPOWER</option><option value=38>·····ENCHANT</option><option value=17>·····EPISODE</option><option value=11>·····FLOURISH</option><option value=12>·····ISANDA</option><option value=13>·····ISSELIA</option><option value=8>·····LAUREL</option><option value=9>·····LEADERSHIP</option><option value=10>·····MARINE VIRTUE</option><option value=7>·····ORACLE</option><option value=2>·····PROMINENCE</option><option value=3>·····SEA PRELUDE</option><option value=4>·····SEA SWIFT</option></select>
                        </td>
                        </tr>
                        <tr>
                        <td  style=" font-family:Arial; font-size:10px; font-weight:bold">
                        
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a  style="color:Gray;" onmouseover="this.style.color='black'" onmouseout="this.style.color='gray'" href="logout.aspx">Logout</a>&nbsp;&nbsp;&nbsp;
                          
                        
                        </td>
                        </tr>
                        </table>
                        </td>
 
                        </tr>
 
                        </table>
                        </div>
                        </td>                        
                    </tr>
                    
                    
                    
                    
                    
                    
                    
                
                <!-- BANNER END -->
 
              
 
 
            </td>
        </tr>
        <tr>
            <td  class="menu" COLSPAN=3>
                               <table width="100%" border="0" cellspacing="0" cellpadding="0" >
                                      <tr>
                                              <td width="53%">
                        
                                              <script type="text/javascript">
                                                  drawMenus();
                                              </script>
                        
                                              </td>
                                              <td width="47%" align="right" class="breadcrumb" style="text-align:right; color:White; vertical-align:middle; padding-right:5px">
                        <span >
                                                     Welcome,&nbsp;Lim Han   .&nbsp;&nbsp;You have logged on&nbsp;:&nbsp;20/May/2013 11:30:12 AM
                            </span>
                                              </td>
                                      </tr>
                               </table>
            </td>
        </tr>
        <tr id="middlerow">
            <td class="contentpanel" id="contentpanel" width="98%"  COLSPAN=3>
                <!-- CONTENT START -->
                <iframe onload="SessionRefresh()" id="iframecontentpanel" name="iframecontentpanel" class="contentpanel maximizecontentpanel" src="dashboard/shipmanagerdashboard.aspx"
                    frameborder="0"></iframe>
                <!-- CONTENT END -->
            </td>
        </tr>
        <tr id="footerrow">
            <td id="footer"  COLSPAN=3>
                <div class="footer" style="width:49%;text-align:right;float:right;">Copyright © 2008 Teledata Marine Solutions. All rights reserved.</div>
                               <div class="footer ftbold" style="width:49%;text-align:left;">&nbsp;</div>
            </td>
        </tr>
    </table>
    <!-- This is form is used for parameter recording to populate the combobox in the tree -->
    <form id="frmTreeLoad" name="frmTreeLoad" action="http://localhost/sm7/inventory/componenttreexml.aspx" target="ifrTree" method="post">        
        <input type="hidden" name="hidParameterCategoryCode" id="hidParameterCategoryCode" value="1" />
        <input type="hidden" name="hidEntityCode" value="0" />
        <input type="hidden" name="hidURLReferer" value="" />
        <input type="hidden" name="hidEntityType" value="0" />
        <input type="hidden" name="submitted" value="1" />
        <input type="hidden" name="formaction" value="form_tree_load" />
    </form
    <script language="javascript" type="text/javascript">
                       window.onresize();
    </script>
    <form name="frmEC" id="frmEC" target="iframecontentpanel" method="post" action="http://localhost/sm7/loginsubmit.aspx">
        <input type="hidden" name="cmbEntity" value=""/>
        <input type="hidden" name="hidURL" value=""/>
        <input type="hidden" name="submitted" value="1" />
        <input type="hidden" name="formaction" value="entitychangesubmit" />
    </form>
 
 
 
 
</body>
</html>
 

 

 

 

 

 

 

Thanks & Regards,

 

Maritime Leadership. All the way

Karunanidhi  E

Teledata Marine Solutions
M + 91 9994789611

E karuna...@teledatamarine.com

 

Karunanidhi Ethiraj

unread,
May 20, 2013, 7:26:32 AM5/20/13
to seleniu...@googlegroups.com

Hi Krishna,

 

I have provided the HTML  code, but am unable to fine out the correct one. Plz help me

 

 

Thanks & Regards,

 

Maritime Leadership. All the way

Karunanidhi  E

Teledata Marine Solutions
M + 91 9994789611

E karuna...@teledatamarine.com

 


From: seleniu...@googlegroups.com [mailto:seleniu...@googlegroups.com] On Behalf Of Krishnan Mahadevan


Sent: Monday, May 20, 2013 11:06 AM

Karunanidhi Ethiraj

unread,
May 20, 2013, 8:18:12 AM5/20/13
to seleniu...@googlegroups.com

Hi krishna,

 

Plz find below  the correct find element id of the HTML source. And how to write code for this.

 

 

           

 

 

 

 

Thanks & Regards,

 

Maritime Leadership. All the way

Karunanidhi  E

Teledata Marine Solutions
M + 91 9994789611

E karuna...@teledatamarine.com

 

Reply all
Reply to author
Forward
0 new messages