- NewSelenium
- Posts : 1
Join date : 2013-11-09
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.
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
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:
Hope that helps.
- 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
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.
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.
- why selenium?how to test the application using selenium?
- i had already written a java web driver, but, I would like to write a new php page using that java source code
- opera browser not loading the page using selenium Rc(Java)
- How to work with excel opened from IE application using Selenium webdriver java code
- why selenium?how test the application using selenium?
Permissions in this forum:
You cannot reply to topics in this forum