Selenium not working with JQWidgets listbox or Datagrid - selenium

I am testing my web site using Selenium IDE 2.9.0 for Firefox.
My web site uses JQWidgets.
Selenium seems to work fine until you need to simulate clicking on a list item or selecting a row from a data grid.
I have seen other posts similar to this problem like this one
Selenium webdriver ‘jqwidgets – jqxgrid ‘ data grid with java: How to scroll and get the rows visible?
but I can't work out the problem.
When I use the record button to record my interaction with the website it shows the following :-
command=click
target=//div[#id='listitem1site_list']/span
When I double click on this to execute the command it does not select the line in my list.
I have tried mouseDown and clicking on the outer div first and every combination.
Any ideas ?
Thanks

Related

How to select a popup in an iframe with robot framework / selenium

I want to write a testcase for a webapplication with Robot framework and the selenium library. The situation is that when a button is clicked, a popup page is shown withtin the webpage.
This popup is inside an iframe and has it's own etc.
I have a test that verifies if the popup page is opened by searching for presence element x.
Things I have tried are:
1a. Select frame xpath=xpath iframe
1b. Element text should be xxx
2a. Switch window title=title of popup that can be found within the element.
2b. Element text should be xxx
In both situations the test fails. The popup page is opened but the error messages shown are:
Element with locator 'iframe' not found.
Unable to locate window with title 'xxx'.
I searched for similar problems but didn't find any solutions thats helps my case.
try this
Select Frame css:iframe[id^="PopupBoxIframe_"]
where id=yourid
to get back lateron you use
unselect frame

Click inside table not working with Selenium ide recording

I am new to Selenium.
I am trying to record an angularjs based web site.
I want to record a click done inside the table.
Whenever i try to perform this with selenium ide chrome it is just hanging.
But it is working fine if i do it normally.
Best Regards,
Saurav

Click not working on combo-box down arrow button karate UI testing

I tried clicking on down arrow button for a Combo Box (Select is not available. Its a React JS application and once I click on arrow button only list shows selection items) using below karate command but click not happened in application and no error displayed. [The same xpath worked in selenium click command,and showing unique item on Inspect search]
And waitFor("//div[#id='root']/div/div[3]/main/div/div[3]/div[2]/div")
And click("//div[#id='root']/div/div[3]/main/div/div[3]/div[2]/div")
Note: Then I tried below command
And assert('//div[#id='root']/div/div[3]/main/div/div[3]/div[2]/div').exists
and got error
javascript evaluation failed: assert('//div[#id='root']/div/div[3]/main/div/div[3]/div[2]/div').exists, :1:19 Expected , but found root
assert('//div[#id='root']/div/div[3]/main/div/div[3]/div[2]/div').exists
It would really help us if you follow this process, it is simple and should not take much time for you to give us a small snippet of static HTML (or you can mix react if really needed).
https://github.com/intuit/karate/tree/master/examples/ui-test
EDIT: you also seem to have mis-matched single and double-quotes in your code.
Also note that you should be able to fire a JS event or click by using the script() API. See this example: https://github.com/intuit/karate/tree/master/karate-core#script
So this is an alternate approach to be able to overcome any tricky situation that comes up.

Using Selenium (Webdriver) to test Merge

I'm trying to verify restricted fields aren't merged using the OOB merge. I get to the merge window, but can't figure out how to get selenium to click the "OK" button on the dialog
I've confirmed in the html that the element is the InlineDialog_Iframe, and I've tried xrmBrowser.Dialog.ClickCommand(), as well as SwitchtTo() etc, nothing seems to work.
//select both records
xrmBrowser.Grid.SelectRecord(0);
xrmBrowser.Grid.SelectRecord(1);
//click Merge
xrmBrowser.CommandBar.ClickCommand("Merge");
//click Okay ----what goes here?----

Selenium Webdriver 2.30 unable to identify object on the standard Salesforce lookup pop-up window

I am using Selenium Webdriver to automate functional TC in Salesforce application.
Test Scenario:
- On a case page, clicking the "Lookup" i.e., search icon opens up standard Salesforce search popup. I need to input specific string to the search field and click "Go" button.
Although I am able to click on the Search button, the script fails to identify any field on the popup.
I used Alert(), getWindowHandle & iterator functions to verify if the driver is working on the popup window. Yes it is.. the popup is is the working window. I could able to confirm this using the Java id for the browser window. But still it fails to identify any fields.
Let me know if any of you faces similar issue and any solution.
Do let me know if you like to have access to my working sandbox. Would be able to manage it.
Thanks, Manju
I believe the problem is that the elements inside the popup window are in a frame. After switching to the new popup window you need to switch to the frame first before being able to access any of those elements using:
WebElement frameLocator = driver.findElement(By.id("searchFrame"));
driver.switchTo.frame(frameLocator);
Further to Bob's answer you'll also then need to switch to the "resultsFrame" in order to use any of the links returned by the search. Note that in order to switch to a sibling frame you must first go up to the parent of the frameset using:
driver.switchTo().defaultContent();
(frameset guidance here: http://darrellgrainger.blogspot.co.uk/2012/04/frames-and-webdriver.html)
With Selenium IDE:
I was able to select the Salesforce PopUP with this code:
Command:selectPopUp
Target:
Value: Your popUp title
And the result frame:
Command:selectFrame
Target: name=resultFrame
Value: