Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

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

How to test single page application (java) with selenium Empty How to test single page application (java) with selenium

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.
 
 
 
 
 
avatar
bwTester
Posts : 2
Join date : 2014-03-20

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

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.
avatar
ashav
Posts : 4
Join date : 2014-02-10

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

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

How to test single page application (java) with selenium Empty 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