Selenium webdriver script that runs in IE hangs in Firefox

2,763 views
Skip to first unread message

Pooja

unread,
Oct 23, 2012, 7:57:30 PM10/23/12
to seleniu...@googlegroups.com
I have used selenium RC in the past but I am new to webdriver. I have written a script using webdriver that signs in to the website and clicks on certain links. Now,when I run this script in firefox, the sign in happens as expected but none of the links are clicked after that. Here is the code that I am using:

WebDriver driver= new FirefoxDriver();

WebDriverWait wait = new WebDriverWait(driver, 30);
driver.get(<TestURL>);
wait.until(ExpectedConditions.presenceOfElementLocated(By.id(("signIn"))));
    //This method works. It signs in as expected
TestUtils.SignIn("szygvwa_carrier...@tfbnw.net", "user",driver);

wait.until(ExpectedConditions.presenceOfElementLocated(By.id(("notifications-page-button"))));


driver.findElement(By.id("notifications-page-button")).click();
    wait.until(ExpectedConditions.presenceOfElementLocated(By.className(("message"))));

//The code works untill here. But on the next command that clicks messages link, it hangs
    driver.findElement(By.id("messages-page-button")).click();
    wait.until(ExpectedConditions.presenceOfElementLocated(By.className(("username"))));

    driver.findElement(By.id("connections-page-button")).click();
    wait.until(ExpectedConditions.presenceOfElementLocated(By.className(("connections-listview"))));


    driver.findElement(By.id("search-button")).click();
    wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[@class='sf_search_ddown dropdown']")));


    driver.findElement(By.id("menu-more-button")).click();
    wait.until(ExpectedConditions.presenceOfElementLocated(By.className(("dropdown"))));


    driver.findElement(By.id("tokens-menu-more-button")).click();
    wait.until(ExpectedConditions.presenceOfElementLocated(By.id(("sf_tokens_menu_more_ddown"))));
    Thread.sleep(2000);

    driver.quit();

The above code works on IE. So looks like the problem is not that it is not able to find the element. I am using Selenium 2.25.0. I have tried various versions of FF including 3.6, 7, 11, 13, 15 and 16. But none of them worked. Also, the script just hangs. It does not even throw an error in eclipse. I had once let my script run for around 11 hours and still no error.

Please let me know in case you need further information to help me resolve this issue.

Thanks!

Michael Wowro

unread,
Oct 24, 2012, 4:33:06 AM10/24/12
to seleniu...@googlegroups.com
Hallo Pooja,

Code looks good to me. Have you tried to find an alternative for By.className("message"), maybe with xpath?

Yours Michael

Pooja

unread,
Oct 24, 2012, 5:04:49 AM10/24/12
to seleniu...@googlegroups.com
Hey Michael,

I have tried searching by ID, Class and Xpath. Nothing worked so far.

Thanks,
Pooja

Pooja

unread,
Oct 24, 2012, 12:07:48 PM10/24/12
to seleniu...@googlegroups.com
Has anyone else faced similar issue with selenium 2.25.0? Any pointers to the solution would be great help!

Mike Riley

unread,
Oct 24, 2012, 1:07:28 PM10/24/12
to seleniu...@googlegroups.com
Where does it hang?

If you can determine that it will help us figure it out.  Either single step in an IDE or put in some debug output statements to figure it out.

Please do not use any version of FF above 14 for your testing though, as they will have problems doing some functions.

Mike


On Tuesday, October 23, 2012 4:57:30 PM UTC-7, Pooja wrote:
I have used selenium RC in the past but I am new to webdriver. I have written a script using webdriver that signs in to the website and clicks on certain links. Now,when I run this script in firefox, the sign in happens as expected but none of the links are clicked after that. Here is the code that I am using:

WebDriver driver= new FirefoxDriver();

WebDriverWait wait = new WebDriverWait(driver, 30);
driver.get(<TestURL>);
wait.until(ExpectedConditions.presenceOfElementLocated(By.
id(("signIn"))));
    //This method works. It signs in as expected
TestUtils.SignIn("szygvwa_carrieroberg_1350315217@tfbnw.net", "user",driver);

wait.until(ExpectedConditions.presenceOfElementLocated(By.id(("notifications-page-button"))));


driver.findElement(By.id("notifications-page-button")).click();
    wait.until(ExpectedConditions.presenceOfElementLocated(By.className(("message"))));

//The code works untill here. But on the next command that clicks messages link, it hangs
    driver.findElement(By.id("messages-page-button")).click();
    wait.until(ExpectedConditions.presenceOfElementLocated(By.className(("username"))));

    driver.findElement(By.id("connections-page-button")).click();
    wait.until(ExpectedConditions.presenceOfElementLocated(By.className(("connections-listview"))));


    driver.findElement(By.id("search-button")).click();
    wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[@class='sf_search_ddown dropdown']")));


    driver.findElement(By.id("menu-more-button")).click();
    wait.until(ExpectedConditions.presenceOfElementLocated(By.className(("dropdown"))));


    driver.findElement(By.id("tokens-menu-more-button")).click();
    wait.until(ExpectedConditions.presenceOfElementLocated(By.id(("sf_tokens_menu_more_ddown"))));
    Thread.sleep(2000);

    driver.quit();

Pooja

unread,
Oct 24, 2012, 1:55:11 PM10/24/12
to seleniu...@googlegroups.com
It gets stuck at the point where it is trying to click the messages button.I modified the code as:driver.findElement(By.xpath("//a[@id='notifications-page-button']")).click(); System.out.print("Notification button click passed"); driver.findElement(By.id("messages-page-button")).click(); System.out.print("Message button click passed"); In the console I see: Notification button click passed.

I then changed my code to:
driver.findElement(By.xpath("//a[@id='notifications-page-button']")).click();
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//a[@id='messages-page-button']")));
driver.findElement(By.xpath("//a[@id='messages-page-button']")).click();
wait.until(ExpectedConditions.presenceOfElementLocated(By.id("connections-page-button"))); 
driver.findElement(By.id("connections-page-button")).click();
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(("//a[@id='search-button']"))));

This code works. But when I added any assert statements, it hangs. So the following code hangs at assert statement

driver.findElement(By.xpath("//a[@id='notifications-page-button']")).click();
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//a[@id='messages-page-button']")));
Assert.assertTrue(isElementPresent(By.xpath("//a[@id='messages-page-button']")), "Messages drop box was not displayed");

Code for isElementPresent:
private boolean isElementPresent(By by) {
   try {
       driver.findElement(by);
       return true;
   } catch (NoSuchElementException e) {
       return false;
   }
}

Michael Wowro

unread,
Oct 25, 2012, 5:49:26 AM10/25/12
to seleniu...@googlegroups.com
Hi Pooja,

I still can't get the point. Plz provide the .html-code file as an attachment. Before that delete as good as you can the parts that are not necessary to show your problem, which has two advantages: your project remains secret to you, your helpers can better focus in their little time

Yours Michael

Pooja

unread,
Oct 25, 2012, 7:34:53 AM10/25/12
to seleniu...@googlegroups.com
Ok.Let me detail out the problem. I have three links in my app. Notifications, messages and connections.
On clicking notifications, notifications drop box is displayed. On clicking messages, messages drop box is displayed and on clicking connections, connections drop box is displayed.
In the script, I click notifications link, wait for notifications drop box and then assert for notifications dropbox. Same for messages and connections in sequence.
The notification sequence works correctly. In messages, it clicks on messages link and then hangs on the wait for messages drop box link. I know this since I had put print command after every line.
Heres is my code:
driver.findElement(By.xpath("//a[@id='notifications-page-button']")).sendKeys("\n");
wait
.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[@id='notifications-dropdown-list']//li//div[@class='message']")));
Assert.assertTrue(isElementPresent(By.xpath("//div[@id='notifications-dropdown-list']//li//div[@class='message']")), "Notifications drop box was not displayed");

wait
.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//a[@id='messages-page-button']")));

driver
.findElement(By.xpath("//a[@id='messages-page-button']")).sendKeys("\n");
wait
.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[@class='sf_messages_list dropdown']//li//div[@class='message']"))); //This is the line where the script hangs. If I remove this line and the next line and continue with just the click commands, they work. But when I have this line and the next, the remaining click commands are not executed

Assert.assertTrue(isElementPresent(By.xpath("//div[@class='sf_messages_list dropdown']//li//div[@class='message']")), "Messages drop box was not displayed");

wait.until(ExpectedConditions.presenceOfElementLocated(By.id("connections-page-button")));
driver.findElement(By.id("connections-page-button")).click()

Heres the HTML for messages section:
<li class="icon mm open">
<a id="messages-page-button" class="mm" href="#">
<span class="icon"></span>
<span class="badge hidden_elem">
<strong>
<em>0</em>
</strong>
</span>
</a>
<div class="dropdown-holder">
<div class="sf_messages_list dropdown" data-eventprefix="mainmenu_messages">
<div class="tb-dropdown-header">Messages</div>
<div class="tb-dropdown-body" data-url="/messages/dropdown">
<div class="document-title" style="display: none; !important"> - Dropdown Messages</div>
<div id="messages_list_view_76345" class="message-threads-listview">
<ul>
<div class="no_items hidden_elem">
</div>
</div>
<div class="tb-dropdown-footer" style="display: block;">
</div>
<span class="shadow-hide"></span>
</div>
</li>

Heres the HTML for notifications section:

<li class="icon mm">
<a id="notifications-page-button" class="mm" href="#">
<span class="icon"></span>
<span class="badge hidden_elem">
<strong>
<em>0</em>
</strong>
</span>
</a>
<div class="dropdown-holder">
<div id="notifications-dropdown-list" class="sf_notifications_list dropdown" data-eventprefix="mainmenu_notifications">
<div class="tb-dropdown-header">Notifications</div>
<div class="tb-dropdown-body" data-url="/notifications/dropdown"></div>
<div class="tb-dropdown-footer">
<a class="view_all" href="/notifications/view">View All Notifications</a>
</div>
</div>
<span class="shadow-hide"></span>
</div>
</li>

Please let me know in case you need more detail.
BTW replacing click() with sendKeys("\n") did not help :(

Thanks,
Pooja

Mike Riley

unread,
Oct 25, 2012, 12:52:27 PM10/25/12
to seleniu...@googlegroups.com
Your isElementPresent() is not catching other possible Exceptions that may happen.  In that case the return value is undefined and frankly I am not sure what Java does in that case.  Change the catch to catch all Exceptions.  Just for debugging purposes you might want to output what exception happens there.

Mike

Pooja

unread,
Oct 25, 2012, 2:51:25 PM10/25/12
to seleniu...@googlegroups.com
But it fails at
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[@class='sf_messages_list dropdown']//li//div[@class='message']"))); 
before isElementPresent method being called. isElementPresent  method is called in the next statement.

Thanks,
Pooja

Michael Wowro

unread,
Oct 26, 2012, 4:33:59 AM10/26/12
to seleniu...@googlegroups.com
Maybe you xpath is wrong:
In genereal you can check the xpath with xpath-checker addon in Firefox, as soon as you clicked the link manually. I assume, you've done it ...

I remember running into troubles with multiple classes, so try this
By.xpath("//div[contains(@class,'sf_messages_list')]//li//div[@class='message']")

By the way, keep in mind, that class is a bad locator, as it is unspecific. Try to use unique locators, as it avoids troubles ...

Your Michael

Pooja

unread,
Oct 28, 2012, 1:43:01 PM10/28/12
to seleniu...@googlegroups.com
I tried this. Its did not work either :(
I have tried using IDs also but that too did not help. The script always hangs at the point I described in my above post.

This issue is preventing me from using webdriver for testing our application as the elements that are not clickable are the entry points to the app.

Any pointer regarding this issue will be a great help to me!

Thanks,
Pooja

Michael Wowro

unread,
Oct 29, 2012, 6:43:41 AM10/29/12
to seleniu...@googlegroups.com
Hallo Pooja,

can you provide the url please?

Yours Michael

Pavan

unread,
Oct 29, 2012, 7:45:28 AM10/29/12
to seleniu...@googlegroups.com
In addition to html Sources for Notification & Messages that u've added in the thread, are you able to see any associated java script of the form. For instance:

<script>
    $
("p").click(function () {
      $
(this).slideUp();
   
});
</script>

or

$(function() { $('a.view').attr('href', 'http://www.google.com'); });

Thanks,
Pavan

Pooja

unread,
Oct 29, 2012, 9:11:30 AM10/29/12
to seleniu...@googlegroups.com
Hi Pavan,

Here are the lines related to scripts that I see on the page source:

<link rel="stylesheet" type="text/css" href="/assets/8ce0e1ee/styles.css" />
<script type="text/javascript" src="/assets/e4aca1c3/jquery.min.js"></script>
<script type="text/javascript" src="/assets/e4aca1c3/jui/js/jquery-ui.min.js"></script>
<script type="text/javascript" src="/assets/8ce0e1ee/third-party.js"></script>
<script type="text/javascript" src="/assets/8ce0e1ee/app.js"></script>
<script type="text/javascript" src="/assets/8ce0e1ee/js/jquery.autoresize.js"></script>
<script type="text/javascript" src="/assets/8ce0e1ee/js/jquery.tipsy.js"></script>
<script type="text/javascript" src="/assets/93f1eaab/iefix.js"></script>
<script type="text/javascript">
/*<![CDATA[*/
var sf = {"email":null,"username":null,"id":null,"fbId":null,"tid":null,"mutualConnectionsCount":5,"imagesBaseUrl":"\/assets\/15930264","appId":"376170185786006"};
var StaticFiles = ['/assets/e4aca1c3/jquery.min.js','/assets/e4aca1c3/jui/js/jquery-ui.min.js','/assets/8ce0e1ee/third-party.js','/assets/8ce0e1ee/app.js','/assets/8ce0e1ee/js/jquery.autoresize.js','/assets/8ce0e1ee/js/jquery.tipsy.js','/assets/93f1eaab/iefix.js','/assets/8ce0e1ee/styles.css']; /*]]>*/
</script>
<noscript>
<meta http-equiv="refresh" content="0;url=/default/javascript">
</noscript>
<script type="text/javascript"> $(function() { $('body').removeClass('noJS'); });
</script> <style type="text/css"> body.noJS {display: none;} </style> </head> <body class="noJS"><script type="text/javascript">
/*<![CDATA[*/ Nav.init(); FacebookManager.init(); LocationManager.init(); /*]]>*/
</script>

Thanks,
Pooja

Pooja

unread,
Oct 29, 2012, 9:49:06 AM10/29/12
to seleniu...@googlegroups.com
Hi Michael,

Heres the website:


Thanks,
Pooja
Message has been deleted
Message has been deleted

Pooja

unread,
Nov 1, 2012, 5:16:21 AM11/1/12
to seleniu...@googlegroups.com
Anyone who can please help me with this?

Thanks,
Pooja

Michael Wowro

unread,
Nov 2, 2012, 7:06:04 AM11/2/12
to seleniu...@googlegroups.com
Hallo Pooja,

honestly I've lost the overview in this thread. Can you please provide: 2.) -> https://groups.google.com/forum/#!msg/selenium-users/T2lbH3Nfpto/HbhR7frrUDQJ

Yours Michael

Pooja

unread,
Nov 2, 2012, 7:18:09 AM11/2/12
to seleniu...@googlegroups.com
Hi Michael,

The website that I am trying to test is www.Smileyfish.com
What I want my script to do is following:
1. Login by clicking on sign in button
2. After sign in, click on notifications icon (its the ! icon in menu bar)
3. Wait for the drop box that displays notifications to appear
4. Click on messages icon (the icon next to notifications)
5. Wait for the drop box that displays messages to appear
6. Click on connections icon (the icon next to messages)
7. Wait for the drop box that displays connections to appear

The script that I have written, works till step 4. At the wait in step 5, it just hangs. 
Following is the code for the script:

driver.findElement(By.xpath("//a[@id='notifications-page-button']")).sendKeys("\n");
wait
.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[@id='notifications-dropdown-list']//li//div[@class='message']")));
Assert.assertTrue(isElementPresent(By.xpath("//div[@id='notifications-dropdown-list']//li//div[@class='message']")),"Notifications drop box was not displayed");

wait
.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//a[@id='messages-page-button']")));
driver
.findElement(By.xpath("//a[@id='messages-page-button']")).sendKeys("\n");
wait
.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[@class='sf_messages_list dropdown']//li//div[@class='message']"))); //This is the line where the script hangs. If I remove this line and the next line and continue with just the click commands, they work. But when I have this line and the next, the remaining click commands are not executed

Assert.assertTrue(isElementPresent(By.xpath("//div[@class='sf_messages_list dropdown']//li//div[@class='message']")),"Messages drop box was not displayed");

wait
.until(ExpectedConditions.presenceOfElementLocated(By.id("connections-page-button")));
driver
.findElement(By.id("connections-page-button")).click()


Please let me know if I am missing any information that you may need to help me with the problem.

Thanks,
Pooja
Message has been deleted

Michael Wowro

unread,
Nov 2, 2012, 11:17:51 AM11/2/12
to seleniu...@googlegroups.com
Hey Pooja,

you're persistent - that's good :) - anyhow I regot the overview ...
so I've registered to smileyfish now - I hope not to get to much emails now ;)
honestly I haven't a match in xpath-checker searching for an element with
//div[@class='sf_messages_list dropdown']//li//div[@class='message']
Maybe your test account doesn't have any messages (like me) and you checked the xpath with your personal account (which is actually having messages).
If that's not the solution, send me a message to my smileyfish account.

Yours Michael

Pooja

unread,
Nov 2, 2012, 11:52:59 AM11/2/12
to seleniu...@googlegroups.com
Hi Michael,

I changed the Xpath to
 //div[@class='tb-dropdown-body']//div[@class='no_items']

But that did not help. It still hangs at the wait. The new code that I am running is:
driver.findElement(By.xpath("//a[@id='notifications-page-button']")).sendKeys("\n");
wait
.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[@id='notifications-dropdown-list']//li//div[@class='message']")));
Assert.assertTrue(isElementPresent(By.xpath("//div[@id='notifications-dropdown-list']//li//div[@class='message']")),"Notifications drop box was not displayed");


wait
.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//a[@id='messages-page-button']")));
driver
.findElement(By.xpath("//a[@id='messages-page-button']")).sendKeys("\n");

wait
.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[@class='tb-dropdown-body']//div[@class='no_items']"))); //This is the line where the script hangs. If I remove this line and the next line and continue with just the click commands, they work. But when I have this line and the next, the remaining click commands are not executed


Assert.assertTrue(isElementPresent(By.xpath("//div[@class='tb-dropdown-body']//div[@class='no_items']")),"Messages drop box was not displayed");


wait
.until(ExpectedConditions.presenceOfElementLocated(By.id("connections-page-button")));
driver
.findElement(By.id("connections-page-button")).click();

I am totally clueless :(

Thank you so much for you help!

Thanks,
Pooja

Michael Wowro

unread,
Nov 5, 2012, 5:22:00 AM11/5/12
to seleniu...@googlegroups.com
Hallo Pooja,

I can confirm your issue now. In IE it's working correctly - in FF 14 and 15 not (it's not firing the TimeoutException as expected).
Can you please provide an anonymous Smileyfish-account to report this issue to the project?
After that we'll try to find a workaround.

Yours Michael

Pooja

unread,
Nov 5, 2012, 6:00:00 AM11/5/12
to seleniu...@googlegroups.com
Hi Michael,

Thank you very much for confirming this!
I just sent you the credentials for the account via email.

Let me know in case you need any more information.

Thanks,
Pooja

Michael Wowro

unread,
Nov 9, 2012, 1:07:07 PM11/9/12
to seleniu...@googlegroups.com
Hi Pooja,

here's the issue: http://code.google.com/p/selenium/issues/detail?id=4757 - for me it feels like a bug. Let's see what developer's tell.
I try to find a workaround in my next timeslot ...

Yours Michael

Michael Wowro

unread,
Nov 10, 2012, 6:38:34 AM11/10/12
to seleniu...@googlegroups.com
Hi Pooja,

there seems to be black magic on that issue.
Everything I tried to workaround -> different expected condition methods, cssSelectors didn't work. Even just trying:
driver.findElement(By.xpath("//div[@class='tb-dropdown-body']//div[@class='no_items']"));
hangs up the firefox.

My last idea for workaround is:
id location seems to work, which is shown by the previous code. Ask your javascript-developer to provide an id for the message drop box. Try to select that then with By.id ...

Yours Michael

Pooja

unread,
Apr 12, 2013, 1:26:10 AM4/12/13
to seleniu...@googlegroups.com
Hi Kalpana,

Sorry for the delayed response.
I did not find any solution for this yet. I upgraded selenium version as well as FF version but no luck.

Thanks,
Pooja

On Tuesday, February 26, 2013 6:00:59 AM UTC+5:30, kalpana Doddamreddy wrote:
Hi Pooja,
     I am running into the exact same issue. Did you find a solution for this problem?
Thanks,
KD

Rommy Barriga

unread,
Jul 30, 2013, 3:35:59 PM7/30/13
to seleniu...@googlegroups.com
Hi guys, I experienced a similar problem a couple of days ago and I found the solution in my particular case.
#Using Selenium Webdriver, I wanted to click to the link of "First Link" and that would load content on the page.
Below a portion of code with structure alike my case:
<li class="first-link">
 <a class="common-style" href="javascript:;" style="padding-left: 15px; padding-right: 15px;">First Link</a>
</li>

#The result is that the Webelement is supposed to be found and clicked but switching to the UI, nothing happened, no error was thrown either (element not found, element not ready for click, element disabled, etc)
After trying a couple of different ways to find the link through (xpath and css, didnt try by id because in my case there is no unique id), I was able to access and click the element with Selenium webdriver by css with the following value: "li.first-link a"
However, when I tried to access by xpath with the following value, this was 'found' in Firefox but click didnt work: ".//li[a/text()='First Link']"
The problem was a slight xpath syntax issue, that firebug from Firefox didnt report at all, in fact it found the link.
I changed the braces order like this: ".//li/a[text()='First Link']"
Now it works as expected, First Link is found and clicked and the javascript code that loads the page is fired.

My findings are:
* It is not a timing issue, so this does not happen because you try to click an element that is not ready. Otherwise we had solved this with an explicit Selenium wait...
* The problem is not that element is found and the javascript is not fired. You can try to execute directly javascript code and fire manually the events and see this does not work.
* This issue happens on Firefox 22,probably works for older versions from this browser. I cant provide information if this works on IE or Chrome. The issue itself is that even that there is a syntax conflict on xpath firefox does not throw an exception, that makes you think there is nothing wrong with your code, but there is.
* This is an unexpected unhandled behavior for Firefox, it is good a bug has been opened.
 
SOLUTION SUGGESTED: verify your html structure, your xpath, try to find issues in the syntax, find different ways to access to the element.

Pavol Kianicka

unread,
Nov 13, 2013, 7:09:49 AM11/13/13
to seleniu...@googlegroups.com
Hi guys. I've been for entire day solving the very same behaviour of Webdriver 2.37 C# script being executed in Firefox 25.0. It's a simple script that signs in EXT.NET web portal, creates a new user account, signs out, signs new user in and signs him out.
I experienced problem with Firefox very randomly getting frozen(locked up/hanging) when I called driver.FindElement(By.XPath(path)).Click() method on two places. When I wanted to click a button that displays a menu with Sign-out button. Then when I wanted to sign the newly created user in. In both cases I had to play with XPath expression, but in the 2nd case only when I used driver.SwitchTo().DefaultContent() method I stopped it locking up.

Here is the code that seems to be finally working for me:
            // Sign out - me
            driver.SwitchTo().DefaultContent();
            WaitForElementPresent(By.XPath("//table[@class='x-toolbar-right-ct']"), 4);
            WaitForElementPresent(By.XPath("//table[@id='cphShellContent_Header1_btnLoginUser']/tbody/tr[2]/td[2]/em/button"), 4);
***** THIS WAS THE TROUBLE MAKER Click() call *****
            driver.FindElement(By.XPath("//table[@id='cphShellContent_Header1_btnLoginUser']/tbody/tr[2]/td[2]/em/button")).Click();
            wait.Until(ExpectedConditions.ElementExists(By.XPath("//div[@id='cphShellContent_Header1_Menu1']/ul/li[2]/a[@id='cphShellContent_Header1_btnSignOut']")));
            action.MoveToElement(driver.FindElement(By.XPath("//div[@id='cphShellContent_Header1_Menu1']/ul/li[2]/a[@id='cphShellContent_Header1_btnSignOut']"))).Build().Perform();
            driver.FindElement(By.XPath("//a[@id='cphShellContent_Header1_btnSignOut']/span")).Click();

            // Sign in - new user
            driver.SwitchTo().DefaultContent();
            WaitForElementPresent(By.Id("cphShellContent_txtLogin"), 4);
            driver.FindElement(By.Id("cphShellContent_txtLogin")).SendKeys(login);
            Thread.Sleep(1000);
            driver.FindElement(By.Id("cphShellContent_txtPassword")).SendKeys(pwd);
            Thread.Sleep(1000);
***** 2nd TROUBLE MAKER Click() call WITH NEW XPATH. NOTE THE driver.SwitchTo().DefaultContent(); BEING CALLED FIRST *****
            driver.FindElement(By.XPath("//table[@id='cphShellContent_btnLogin']/tbody/tr[2]/td[2]/em/button")).Click();

Hope, it helps someone else.

Raghu veer

unread,
Jun 16, 2014, 12:49:07 AM6/16/14
to seleniu...@googlegroups.com
Hi Pooja 

I too had similar issue earlier and the result of my R&D on this was disabling the fire-fox browser plugins which are un-necessary.This should solve your problem

Check out Guys i spend sleep less nights on this thing at last this solution worked for me..
Reply all
Reply to author
Forward
0 new messages