How to check whether a radio button is selected or not? - selenium

I am trying to check whether a radio button is selected or not in "spicejet.com". Even after clicking the radio button, I am getting output as "false". So, Please help me to check whether it's selected or not? I am using the below code. Please suggest to me the changes or the correct way.
System.out.println(driver.findElement(By.cssSelector("circle[fill-rule='evenodd']")).isSelected());
driver.findElement(By.cssSelector("circle[fill-rule='evenodd']")).click();
System.out.println(driver.findElement(By.xpath("circle[#fill='#EDB16A']")).isSelected());

Related

How can I remove windows right click menu?

I have a group of text boxes within my form. Whenever I right click on them or the panel they are in, I get this menu:
I want to remove this menu from showing, and leave the right click to be nothing. However, the mouseclick event never fires for any of these. Therefore, I am having trouble getting rid of it. It usually shows up when my text is highlighted.
Is there a way to remove it? Or am I looking in the wrong event?
Another option is to set the ShortcutsEnabled Property of the TextBoxes to False:
Use the ShortcutsEnabled property to enable or disable the
following shortcut key combinations and the control’s shortcut
menu
This disables the keyboard shortcuts as well; not sure if that is applicable to your scenario.

In a group check box is it possible to select an option by clicking anywhere in the screen and not exactly inside the check box?

From a group check box is it possible to select only one option. And I want to know whether a particular option can be selected without exactly clicking inside the check box. i,e Is it possible to select an option by just clickig somewhere in the screen where the text of the option is displayed.
I was testing an application and i found that it was able to select an option even without clicking inside the check box, so wanted to know whether that is a validation bug!!
I do not think that it is a bug if there is only one radio button or check box on the screen. Such type of functionality is sometimes provided in order to provide extra functionality to the user. There are certain validations that are capable to do this. But if there are multiple check boxes or radio buttons on the screen then it must be a bug. Because in case of multiple check boxes on the screen the script does not know which button to check.

How to use Mouseout Function in VBA with a condition Check?

Hi I have a VBA application with a combobox selection option.One of the combobox option is Other which when user select that option an invisibled label will pops up and prompt the user to fill the txtOther control.now my question is how I can get rid of the prompted label and make it to invisible after user fill the txtOther and move(focused)in other control?
here is a shot of my app:
Thanks for your time and help
It depends on how often or when you want the check to be done. I couldn't find a good reference to show you all of this, but you can view your VBE.
Within the code behind your userform you can use events for the text box.
If you want the check done every time you leave the text box:
Use the TextBox_Exit event.
If you want it to fire whenever the contents are changed, used TextBox_Change. There's lots of options, but based on your explanation I'd probably use Exit.
This answer shows some syntax examples for using the Textbox_Exit event.

Accessing Datarepeater Button

I have added a button in datarepeater. If clicked once, it executes code and Button.text should change to Yes. Clicked again, it executes the opposite code and button.text should change to No. Codes are being executed (I am using flag variable) but Button.text is not changing.
How to change this text. I am simply trying Button.text="Yes" but probably I need to give some reference of the row no. too. How to do it?
Please advise.
Thanks
Furqan
Please check this question:
Handle Button Click in WinForm DataRepeater C# Power Pack
Also: the CurrentItem property has a property named Controls that allows you to access its child controls like this: CurrentItem.Controls["OKButton"]

How would you make a checkbox in a Outline View become checked when all it's children's checkbox's are checked?

How would you make a checkbox which is on a parents/groups row in an outline view become checked when all it's children's checkbox's are checked. But when only some are checked display a line. Here is an example of what I'm talking about:
alt text http://snapplr.com/snap/042v
Whenever you check a box, check to see if all its siblings are checked. If so, check the parent. (And run the check again on that level.)
To do that... well, your NSOutlineView has a data source, right? Something that's telling it what to display? Well, in the method called by the checkbox when it's clicked (whatever you set that up to be), get the parent object behind the row which was clicked, and then update its status. If you don't have a direct reference to the checkbox from the model, you can use -[NSOutlineView parentForItem:] to find it.
Hopefully that gives you enough to get started. If it doesn't, then you'll need to ask a more specific question, detailing exactly which parts you're having trouble with.