In Sencha 2.3.1 Checkbox value is always empty? - touch

In my application i have used checkbox (right now m upgrade my sencha version 2.0 to 2.3.1) m facing problem with getting checkbox value
Here my code:
this.down('#rememberMeChkBoxId').getValue();
It return always "". In Sencha 2.0 it is working fine.

You either use the form
this.down('.form').getValues()
or you need the checkbox value
Ext.Viewport.down('.checkboxfield').getSubmitValue()

Related

Selenide test fails to interact with Material`s checkbox

Dear stackoverflowers.
We are using Selenide framework in our project to write automation tests for UI.
We switched to Material-UI recently and faced with technical problems when it comes to simple checkbox.
I am trying to select checkbox.
SelenideElement rememberMeCheckBox = $(By.cssSelector("input[type=\"checkbox\"]"));
rememberMeCheckBox.setSelected(isSelected);
But while doing that I get an exception:
Element should be visible {input[type="checkbox"]}
Element: '<input type="checkbox" value="on" displayed:false></input>'
And indeed when I check the real DOM it contains opacity: 0:
When I set the opacity by force my automation tests works well. How to deal with that ?
It's not a Selenide problem, but a common Selenium problem.
Selenium defines elements with "opacity: 0" as invisible.
See How to force Selenium WebDriver to click on element which is not currently visible?
One simple way to enable this checkbox is to click its parent element:
$("input[type=\"checkbox\"]").parent().click();
At least it works for me.

AEM component not displayed on Preview Mode

I have developed a few components for AEM but I just ran into an issue. One of the components I created is not displaying when I append the wcmmode=disabled flag. It works great on edit mode but once I pass the flag the component and contents are gone, this is the first time that this happens.
If it helps the component that I created is an extension of the column control component from AEM and it automatically adds children to it.
URL example in Edit Mode:
http://localhost:4502/cf#/content/location/file.html
URL example with WCMMODE flag set to disabled:
http://localhost:4502/content/location/url.html?wcmmode=disabled
$('#ContentWrapper').resize() / $(document).resize();
Try this code in your JS file. Once document ready, resize method will get updated component invisible portion.
I was using Column Control (sightly version) as a guide and figured out that the following code was what was causing the issue:
if (typeof wcmmode != "undefined" && wcmmode.isEdit())
Thank you for helping me debug this issue.
I guess it is the CSS issue . Can you inspect element &check .some times "float:left,right" cause this issue .

Problems while working with Webdriver on HTML 5 and ExtJs

I am working on an application which is developed in ExtJs and is a HTML 5 type.
I an confronting a problem while interacting with button clicks and selecting drop down elements where only one option is present in the DD list.
Is this a problem with my Webdriver Code
Is this a problem with Eclipse (By Kepler)
Or is this a problem of HTML 5 or ExtJs
If driver.findElement(By.something).click(); is not working for you you cant try click through java script:
((JavascriptExecutor)driver).executeScript(script, element);
Example:
WebElement element = driver.findElement(By.id("MainButton"));
((JavascriptExecutor)driver).executeScript("arguments[0].click()", element);
HTML 5, at the time of writing, is not fully supported with Selenium IDE. A good
example of this is elements that have the contentEditable=true attribute. If
you want to see this, you can use the type command to type something into the
html5div element. The test will tell you that it has completed the command but
the UI will not have changed

dojo dijit.form.timetextbox disabled but value still present

I want to have my dojo dijit.form.timetextbox disabled but the last set value still displayed.
If I set the disabled attr to true the field is disabled but the value is gone. Is there any other way?
dijit.byId('form_endtime').set('disabled', true);
I am using Dojo 1.6
As I found this is only a problem on Chrome

How do you get Selenium to work with SmartGWT components?

I'm trying to use Selenium to select a row in a SmartGWT table.
I have tried the following commands to no avail (the click definitely happens but the table widget doesn't respond):
selenium.mouseDownAt("isc_ContactListGrid_0_wrapper", "50,50");
selenium.clickAt("isc_ContactListGrid_0_wrapper", "50,50");
You need to install SmartGWT user extensions and use specific SmartGWT locator (scLocator)
See more here - http://www.rhq-project.org/display/RHQ/Testing+SmartGWT+with+Selenium