Skip to content
This repository was archived by the owner on Nov 29, 2018. It is now read-only.

click failing in selenium 2.39 and firefox 26.0 #6756

Closed
lukeis opened this issue Mar 4, 2016 · 16 comments
Closed

click failing in selenium 2.39 and firefox 26.0 #6756

lukeis opened this issue Mar 4, 2016 · 16 comments

Comments

@lukeis
Copy link
Member

lukeis commented Mar 4, 2016

Originally reported on Google Code with ID 6756

Before filing an issue, please read the page at
http://code.google.com/p/selenium/wiki/SeleniumHelp This contains lot of
information about how best to get help, and tells you what we need to know.

Run the following test

WebDriver driver = new FirefoxDriver();
    driver.get("http://en.wikipedia.org/wiki/Main_Page");
    driver.findElement(By.linkText("Create account")).click();   ---Step failing 
    assertEquals("Create account - Wikipedia, the free encyclopedia", driver.getTitle());
    driver.quit();

Expected:Create account page loaded
Actual:Still on the main page without any exceptions




Selenium version:2.39
OS:Windows
Browser:Firefox
Browser version:26


Please provide any additional information below. A sample reduced test
case, or a public URL that demonstrates the problem will intrigue our merry
band of Open Source developers far more than nothing at all: they'll be far
more likely to look at your problem if you make it easy for them!

Reported by nishanthmehta on 2013-12-23 12:19:01

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Reported by barancev on 2013-12-24 08:41:54

  • Labels added: Browser-Firefox

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Please open the system display settings and ensure that font size is set to 100%, see
the attached screenshot.

Reported by barancev on 2013-12-24 08:47:04

  • Status changed: NeedsClarification

- _Attachment: change-windows-font-size.png
![change-windows-font-size.png](https://storage.googleapis.com/google-code-attachments/selenium/issue-6756/comment-2/change-windows-font-size.png)_

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Thanks a lot!!!!! It works 

Reported by nishanthmehta on 2013-12-24 08:59:16

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Reported by barancev on 2013-12-24 09:02:37

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Can you please let me know how does changing the font size solve this issue

Reported by nishanthmehta on 2013-12-27 04:26:24

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

New versions of Firefox (25+) take into account "system font size" and scale the page
appropriately. But the browser does not tell Selenium about it, unfortunately. So Selenium
calculates wrong coordinates of elements and misclicks.

Reported by barancev on 2013-12-27 09:26:17

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

So this is something Firefox has to fix? Is there a bug filed?

Reported by lammerswout on 2013-12-27 10:59:14

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

I'm not sure what part should be fixed and how, see the issue 6112

Reported by barancev on 2013-12-27 11:01:02

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

One of the clicks is working in FireFoxDriver and not in the HTMLUnitDriver.Is there
already a known bug for this like the above one

Reported by nishanthmehta on 2013-12-31 04:38:42

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

And i am not getting element not found exception

Reported by nishanthmehta on 2013-12-31 04:42:08

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Fixed this by extending the HTMLUNitDriver and enabling javascript
public class CustomHtmlUnitDriver extends HtmlUnitDriver {

    public CustomHtmlUnitDriver(boolean enableJavascript) {
        super(enableJavascript);
    }


 @Override
    protected WebClient modifyWebClient(WebClient client) {
        //disabling javascript Errors
        WebClient modifiedClient = super.modifyWebClient(client);
        modifiedClient.getOptions().setThrowExceptionOnScriptError(false);
        return modifiedClient;
    }
}

Reported by nishanthmehta on 2014-01-03 05:03:11

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Unfortunately setting fontsize to 100% is not a feasible solution on a 15" laptop with
3200 x 1800 resolution. At that resolution and setting the screen is pretty much unreadable
-- at least for anyone over 30. So unless the machine is dedicated to just Selenium
testing via Firefox, this isn't viable. Hopefully Firefox will fix with with access
to the necessary environment info for Selenium's use.

Reported by cohagan@acm.org on 2014-02-02 18:33:33

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

One can use a virtual machine with "standard" settings. And, yes, we accept this is
a bug and hope to fix it.

Reported by barancev on 2014-02-02 18:38:46

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

What's the workaround for Macs?

I have lots of click commands that *are* working, just one that is not. Is this bug
about ALL clicks failing with FF-26+ and Sel-2.39+?

Reported by maryann.maypumphrey on 2014-08-07 18:59:12

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

I am having a similar issue. 
Some clicks work, some don't
This works:  driver.findElement(By.id("dbShowLibrary")).click();
This doesn't: driver.findElement(By.name("Valiant Profile")).click();

On the line that doesn't work I see that the element getting selected but not clicked.


I am using Mac OS so there isn't a preference to set the font size to 100%. I am currently
stuck on writing my tests. Could you up the priority on this issue and get it fixed?
Thanks

Reported by 3DeeEdie on 2014-10-24 20:39:44

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Reported by luke.semerau on 2015-09-17 18:21:52

  • Labels added: Restrict-AddIssueComment-Commit

@lukeis lukeis closed this as completed Mar 4, 2016
@SeleniumHQ SeleniumHQ locked and limited conversation to collaborators Mar 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant