How can I fix a button that is clicked but does not perform any actions? - selenium

So I'm currently working on a new project and I need to write some automated tests.
I came across a problem and I don't know how to fix it. If the button of my web page is clicked running selenium it doesn't perform any actions, but if I open the web page manualy and click on the button, everything works fine.
NOTE: I'm completely sure that the xpath is correct and the button is being clicked...
This is what happens running with selenium:
And this is what happens openning the web page manually and clicking on the button:

Related

Tooltip covers the button so I get org.openqa.selenium.ElementClickInterceptedException

I'm using Selenium for integration testing of our web app, and it's been working great up until I got far enough down the sidebar menu. Suddently the Create test would fail with org.openqa.selenium.ElementClickInterceptedException: element click intercepted. Other element would receive the click:
The error was very sporadic - order of tests would affect which test class failed - but finally I figured out the reason is that the tooltip from the most recently clicked menu option covers the button I'm trying to click. Not really sure why sending input to form elements (using WebElement:sendKeys() and org.openqa.selenium.support.ui.Select) does not count as moving the mouse away.
Is there a way to make Selenium work around this, or do we have to turn off tooltips in the test version (for obvious reasons I don't like the idea of running our tests on a custom version of the web app)?

Why is the element being tested (via protractor) clicked, but nothing happens?

I am using protractor v4.0.9 and node v6.8.1 (although I have also tested this issue on 4.6). I have a test that runs through a series of button clicks to get to a form. The code looks something like this:
browser.get('http://someurl');
// App select button
element(by.id('btn-select-app')).click();
// portal select
element(by.id('row-test-portal')).click();
// provisioning form button
element(by.id('btn-provisioning-form')).click();
This is then followed by a function that iterates through the form and fills it out. If I run the test from start to finish (including the function that fills out the form) it will fail when it tries to start filling out the form because it is on the wrong page - that is, even though the terminal is telling me it executed the click on the provisioning button, the form did not load.
If I shorten the test and run it only with the commands you see in the block above, it passes.
When I run it in debug mode I can execute the "element(by.id('btn-provisioning-form')).click();", but it doesn't appear to actually do anything - it will tell me it executed the the click, but the form does not appear on the page - I am still on the previous page. Note that the above test contains another button click prior to the click on the provisioning form button and that appears to work normally.
I have gone so far as to use different locators for the button including xpath and css but the nothing will get me to the provisioning form.
Button code
<div class="col-md-1">
<button id="btn-provisioning-form" ng-show="foo()"
class="btn btn-success glyphicon etc" ng-click="blah()"
aria-label="Provision" popover="Provision" popover-trigger="mouseenter">+</button>
</div>
Some other notes - I have managed to replicate the test using Selenium IDE and when I run that test from the Selenium IDE UI, it is able to click the button and get to the form. It looks like this issue is just being seen when I use protractor.
TL;DR : Protractor is telling me it clicked the button, but the button click isn't causing any change to the page. When I manually click the button outside of protractor, it works just fine. Why is this happening?
Instead of normal protractor click , try clicking through JavaScript code.

Does Selenium supports Rebellion UI?

I am trying to automate a website built in Rebellion UI. However, even if the button is found, Selenium is not able to click on it. Has anybody faced such issue before or has Any idea about it?
I clicked using usual click and double click both, the color of the button changes but the button is not being clicked by Selenium 2.0 (jar 2.45). Please help.

Capturing a newly opened window with Selenium

I'm using the Selenium Client drivers to run tests built in C#. I'm having a problem where the test navigates to a page and clicks on a button in a form with its target set to _blank causing it to open a new window. However the new page being opened returns an XML document and not a typical webpage. Selenium seems to have trouble with this because it hangs when the button is click and the new window opens. No instructions after the click method are executed. The test eventually fails with the error Timed out running command.
Any help/guidance would be appreciated. I've scoured the net but haven't seen anyone running into this particular issue of the page being opened not being a typical webpage which I think is the core of the problem as Selenium can't really manipulate this new opened window. I would post code except that literally all I'm doing is calling the click method on a button which causes a new window to open. Thanks in advance.
To tackle the issue of opening in new window. I typically get url of the link which is to be opened and instead of using selenium.click(), I use:
selenium.open("http://yourwebsite/yourlink")
This helps me to be on the same window only(which avoids opening new window or tab) and when the testing is finished on this page and you want to switch back to original page you can again use:
selenium.open("http://whatever/")

Clicking confirm dialog using firefox 5 and selenium server 2.2

the biggest issue i'm having is that when i click on a link, i can see the confirmation dialog popup. from this site it says:
NOTE: under Selenium, JavaScript confirmations will NOT pop up a visible dialog.
NOTE: Selenium does NOT support JavaScript confirmations that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until you manually click OK.
any idea why i'm seeing a popup when i shouldn't be, or how i can click the 'Ok' on it?
edit: when i record the test using the selenium IDE and run it, it handles confirmation boxes fine. when i exported that test case to PHP, it doesn't work. this is without modifying the code -- using purely what was provided by the IDE.
Try to call
chooseOkOnNextConfirmation() function
From http://release.seleniumhq.org/selenium-core/0.8.0/reference.html