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
ankit_ashri
Posts : 4
Join date : 2012-08-13

if div is used as a popup and do not have a tittle, then how do we used selenium ide to record Empty if div is used as a popup and do not have a tittle, then how do we used selenium ide to record

Mon Aug 13, 2012 4:59 pm
hi, i am just started my career in testing. And i am already stuck in some issue in selenium ide. now my problem is
i have to capture the popup which is opening in a div and doesnt have a tittle.
earlier i used this code in ide to record
click xpath
waithforpopup
selectWindow tittle="" /* but now i dont have a tittle, because the popup is opening in the div and thus have a same tittle as the main page

now how can i able to set focus on the popup.
pls help me guys
sanjeetravi
sanjeetravi
Regular Participant
Regular Participant
Posts : 27
Join date : 2012-07-10
Age : 34
Location : Delhi

if div is used as a popup and do not have a tittle, then how do we used selenium ide to record Empty Re: if div is used as a popup and do not have a tittle, then how do we used selenium ide to record

Mon Aug 13, 2012 5:12 pm
Pls elaborate me what is the content of the pop up then i will be able to help you...is it a login pop up or a selection pop up or a confirmation pop up.


login pop up-contains user name ,password text box and a submit button.

Selection pop up...contains a drop down from which you have to select something

Confirmation pop up-contains two buttons either ok/save or cancel.
avatar
ankit_ashri
Posts : 4
Join date : 2012-08-13

if div is used as a popup and do not have a tittle, then how do we used selenium ide to record Empty Re: if div is used as a popup and do not have a tittle, then how do we used selenium ide to record

Mon Aug 13, 2012 5:29 pm
yah Sure

there is popup by which we can upload images through the backend as we are using wordpress, so they dont provide any title to the div.
thus i can't able to set focus on the popup through the title and i dont think i can set focus through div id.
avatar
rosco
Active particpant
Active particpant
Posts : 20
Join date : 2012-04-05

if div is used as a popup and do not have a tittle, then how do we used selenium ide to record Empty Re: if div is used as a popup and do not have a tittle, then how do we used selenium ide to record

Tue Aug 14, 2012 9:41 pm
Hi,
Could you be more explicit?

Is it a real popup or not ?
Is it a window dialog box to updload files ?
avatar
olivier verhoek
Posts : 4
Join date : 2012-01-23

if div is used as a popup and do not have a tittle, then how do we used selenium ide to record Empty Re: if div is used as a popup and do not have a tittle, then how do we used selenium ide to record

Wed Aug 15, 2012 8:05 pm
I have a popup with the same issue.
I have a counting number, that i get with the [last()]

xpath=(//input[@id='Ok'])[last()]

The information I got from:
http://automationtricks.blogspot.nl/2010/09/how-to-use-functions-in-xpath-in.html
sanjeetravi
sanjeetravi
Regular Participant
Regular Participant
Posts : 27
Join date : 2012-07-10
Age : 34
Location : Delhi

if div is used as a popup and do not have a tittle, then how do we used selenium ide to record Empty Re: if div is used as a popup and do not have a tittle, then how do we used selenium ide to record

Thu Aug 16, 2012 11:16 am
Can you post your complete java code here ?
avatar
olivier verhoek
Posts : 4
Join date : 2012-01-23

if div is used as a popup and do not have a tittle, then how do we used selenium ide to record Empty Re: if div is used as a popup and do not have a tittle, then how do we used selenium ide to record

Fri Aug 17, 2012 5:33 pm
I do not use java. I am a user of IDE and work with the HTML code.

But here is a try:


// ERROR: Caught exception [ERROR: Unsupported command [isTextPresent]]
driver.findElement(By.id("clearErrorsButton_ErrorMessageCombo")).click();
// LTG02.2 - Vul dangerous goods niet en vul UN code SAVE geen foutmelding BR_PRODUCT_00133
String x = driver.findElement(By.id("model_isDangerousGoodsProduct_checkBox_ProductDangerousGoodsWidget")).getAttribute("value");
// ERROR: Caught exception [unknown command [gotoIf]]
driver.findElement(By.id("model_isDangerousGoodsProduct_checkBox_ProductDangerousGoodsWidget")).click();
// ERROR: Caught exception [unknown command [label]]
driver.findElement(By.id("model_unCodeID_comboBox_ProductDangerousGoodsWidget")).clear();
driver.findElement(By.id("model_unCodeID_comboBox_ProductDangerousGoodsWidget")).sendKeys("1950");
driver.findElement(By.id("btnSave_ProductModifyMainWidget")).click();
driver.findElement(By.xpath("(//input[@id='Ok'])[last()]")).click();
for (int second = 0;; second++) {
if (second >= 60) fail("timeout");
try { if (Pattern.compile("${ValidatieFoutMelding}").matcher(driver.findElement(By.id("errorCombo_ErrorMessageCombo")).getText()).find()) break; } catch (Exception e) {}
Thread.sleep(1000);
}
Sponsored content

if div is used as a popup and do not have a tittle, then how do we used selenium ide to record Empty Re: if div is used as a popup and do not have a tittle, then how do we used selenium ide to record

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