I am experimenting with the R port of Selenium, namely the recently released Relenium. Locating web elements on the page using Relenium seems straightforward enough so far. However, I am having difficulty selecting and deselecting checkboxes. Given the following code I would expect some change in the state of the checkbox on the web page:
library(relenium)
firefox <- firefoxClass$new()
firefox$get("http://jamaserv.jama.or.jp/newdb/eng/prod4/prod4TsMkEntry.html")
firefox$printHtml()
chkbox <- firefox$findElementByXPath("//input[#name='chkCarMaker4All'][#type='checkbox']")
chkbox$isSelected()
chkbox$click()
chkbox$isSelected()
What I get is this, which suggests that no change in state has been achieved:
chkbox$isSelected() # query checkbox state
[1] TRUE
> chkbox$click() # to deselect box
> chkbox$isSelected()
[1] TRUE # no change in state?
>
I have looked at questions related to using Selenium in other languages such as this one for Java but haven't applied them to my own case with any success. This is the first time I have used Selenium, so it may be that I am missing something obvious in its Relenium variant. Any pointers on how to select/deselect checkboxes would be appreciated.
It turns out that this is the result of some strange interaction between Firefox, Selenium and Windows 7.
If in your Windows 7 display settings the font is set to anything other than 100% then Selenium will not click on page elements. I had my fonts set to 125%. After resetting this to 100% I became able to set and unset checkboxes in Relenium, so it doesn't appear to be Relenium-specific after all.
The problem is mentioned in this Stack Overflow question and described in more detail and with a screenshot on this Selenium issue report page. Thanks to Relenium co-author Lluis Ramon for finding this fix.
Related
I have a Shiny app that is working properly in Chrome but not in IE.
In the DT::datatable call I use the option searchHighlight = TRUE. In chrome, when i input some text in the search file of the dataTable, the text is filtered and the matches highlighted. If I open the app on IE I have behaviors that are not consistent. Sometimes the text is highlighted, sometime doesn't. The filtering of the content according to the search seems to work on both the browser.
Anyone's experienced a similar issue?
I haven't had this particular issue, but have experienced different functionality between Chrome and IE in the past in DT. If you haven't already, I would encourage you to raise an issue on github (https://github.com/rstudio/DT/issues) as the rstudio team are really good at looking in to these and getting them resolved.
I'm building my first application using CSS Grids.
Using Firefox's DevTools, I'm able to to highlight the Grid's tracks by clicking "# grid" next to an element in the "Rules" pane :
But when I click the "Layout" pane, it always shows "CSS Grid is not in use on this page":
Why is that?
(I'm using the latest Firefox version available today, "62.0.2")
UPDATE: Here's an example project.
UPDATE 2: It does work when I create a new, fresh, profile! But it doesn't work with my current profile, even when I start in safe mode, with all add-ons disabled... I guess I'll customize a new profile!
I agree with you indeed this is a bug in Firefox, I'm using the latest version of developer edition 85.0b9, I faced the same issue. You can clearly see, I've display as Grid still it says CSS Grid not in use on this page.
Issue - It happens when you open it in the default or the 1st Tab, it's not setting some tab-value there. The bug is still not fixed by Bugzilla's dev team, open from past 2 years. Let's hope they fix in future.
Issue Link - https://bugzilla.mozilla.org/show_bug.cgi?id=1492370
Solution - Just duplicate your tab, it'll work like a charm.
I have a .NET MVC web page that contains 3 radio buttons for choosing a value on a form. In a certain test environment that offers two methods of authentication (user/pass or certificate), the radio buttons will change to checkboxes when the page is loaded. This appears to happen when using the user/pass method, but not the certificate.
Browser version is FireFox 52.3 in the environment where this is being tested.
Need to check if it is using a moz-appearance style, but I don't think so.
I suspect that it might have to do with security zones, based on the differing behavior between authentication types.
Has anyone experienced this type of behavior before? Suggestions for what to try?
I finally found a work-around for this issue. We are using Bootstrap styles in our site. At first we thought that utilizing the .disabled class was causing the problem, but removing this class and using the disabled attribute instead did not solve the problem.
After much playing around, I stumbled upon an abnormality with the line-height in the body element declared in the Bootstrap.css. Its default value was 1.428571429. In the FF Inspector, I experimented by changing the value from 1.3 to 1.6 and variants in between.
For whatever reason, using a value between 1.4 and 1.5 caused the control to change from a radio button to a checkbox. I have no explanation for this, except that it might be a bug, or an interaction from another style.
Whenever I right click to inspect element in Firebug on Firefox, it gives me this "*::-moz-progress-bar" CSS listed before the element I inspected. Anyone know what this is and how to get rid of?
There's an option on the Firebug Style ▼ drop-down menu to Show User Agent CSS, you must of accidentally enabled it recently.
The current version of Firebug (reportedly started in version 1.11.3) has a bug where it incorrectly displays numerous User Agent CSS at the top of the list. If you've been using the "Show User Agent CSS" option for a while now and this problem just started, you're most likely experiencing this bug.
Give it some time, as the bug was only posted today (5/16/2013). Hopefully the Firebug developers will release a fixed version within a few days.
And as the other poster said, you can always disable the showing of all User Agent CSS. Though as stated in the bug report (link below), it may still appear in certain cases.
Bug Report: http://code.google.com/p/fbug/issues/detail?id=6451
Bug Discussion: https://groups.google.com/forum/?fromgroups#!topic/firebug/5vwmU-IEkbc
Whenever you are in design mode in VS2012 for editing a Web Form, if you click on anything, and accidentally drag and drop, a CSS auto-style will appear at the top of the HTML for the aspx page.
From some preliminary research, I checked the following:
Tools>Options>HTML Designer>CSS Styling>Style Application Mode, but it was already set to manual. Is there somewhere else I should be looking to disable this functionality?
Right now there is no way to turn off this. We have received this feedback through connect link. Please add vote to this connect bug. And we will consider this in future release of VS.
I also found this, and I have assoicated it rightly or wrongly, with large pages getting totally corrupted (table cell contents being apparrently randomly swapped).
I managed to turn autostyle off by going to Tools>Options>HTML Designer>CSS and selecting 'CSS (inline styles)' for each of the items there.
Autostyling has stopped and (fingers crossed) my latest pages have retained their integrity.
Tools > Options > Web Forms Designer > CSS change all CSS(classes ) to CSS(inline styles)