Share
Go down
NewSelenium
Posts : 1
Join date : 2013-11-09

How to test single page application (java) with selenium

on Sat Nov 09, 2013 6:06 pm
Hi
 
Currently I am working on a single page application, which is developed using AngularJS.
 
It is a questionnaire about a house inspection.
 
Where investigators visit the house and enter the results.
Section 1:  questions about the Basic information about the house
Section 2:  About the Bathroom General questions.
In this section we have about 15 questions and few of them are mandatory.
2 of the mandatory questions are
Q1. Appearance
Q2. Safety
Then Starts the buttons and when user clicks each button opens a pop up dialog box.
 Dialog box will have few dropdown lists and user has to select answers for them.  Few of them are mandatory.
 
The above mentioned 2 mandatory questions are repeated here in the dialog boxes.
 
Problem is
 
When I selected first time using xpath it is working fine but when the same questions appears in the dialog box  I am able to see the dropdown but unable to select the value from the dropdown. I tried with xpath or CSSselector but of no use.
 
Please can someone will help me with my scenario and let me know how can find the web element.
 
 
 
 
 
bwTester
Posts : 2
Join date : 2014-03-20

Re: How to test single page application (java) with selenium

on Thu Mar 20, 2014 5:05 pm
Not sure, if I understand your problem, but I think you should use the following to select from dropdown:


Code:
new Select(driver.findElement(By.xpath(ENTER_XPATH_HERE))).selectByVisibleText(ENTER_VALUE_HERE);



Hope that helps.
ashav
Posts : 4
Join date : 2014-02-10

Re: How to test single page application (java) with selenium

on Thu Mar 20, 2014 6:35 pm
Hi,

Even if the question are repeated; please check the correct xpath for those dropdown. 

Since these 2 questions are now openened in a pop-up window so first you need to handle that pop-up and find out the correct location / xpath for the dropdown. 

You can use Fifebug in FF to identify the same.
Sponsored content

Re: How to test single page application (java) with selenium

Back to top
Permissions in this forum:
You cannot reply to topics in this forum