- 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
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
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
- sanjeetraviRegular Participant
- Posts : 27
Join date : 2012-07-10
Age : 34
Location : Delhi
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.
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.
- ankit_ashri
- Posts : 4
Join date : 2012-08-13
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.
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.
- roscoActive particpant
- Posts : 20
Join date : 2012-04-05
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 ?
Could you be more explicit?
Is it a real popup or not ?
Is it a window dialog box to updload files ?
- olivier verhoek
- Posts : 4
Join date : 2012-01-23
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
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
- sanjeetraviRegular Participant
- Posts : 27
Join date : 2012-07-10
Age : 34
Location : Delhi
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 ?
- olivier verhoek
- Posts : 4
Join date : 2012-01-23
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);
}
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
Permissions in this forum:
You cannot reply to topics in this forum