Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Selenium Script issue
Tue Dec 06, 2016 9:48 pm by njain213

» Difference between QTP, Selenium and Silk test
Tue Dec 06, 2016 7:58 pm by jessicacyrus1

» Where does selenium script pick browser from
Tue Dec 06, 2016 1:52 pm by janbaskt

» Safari throws an HTTP ERROR: 404
Tue Dec 06, 2016 1:51 pm by janbaskt

» Access Denied Error in Selenium RC
Tue Dec 06, 2016 1:51 pm by janbaskt

» Automating Flex application through selenium webdriver
Fri Dec 02, 2016 2:06 pm by abhinay.krs

» Starting with Selenium, what is Selenium?
Mon Nov 28, 2016 4:00 pm by Foma

» Getting started with Selenium
Mon Nov 28, 2016 3:23 pm by Rebbelx

» Selenium IDE Verify different Maps (Hybridview, Mapview etc.)
Fri Nov 25, 2016 9:56 pm by DJ87

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

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

View previous topic View next topic Go down

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

Post by ankit_ashri on 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

ankit_ashri

Posts : 4
Join date : 2012-08-13

Back to top Go down

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

Post by sanjeetravi on 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.

sanjeetravi
Regular Participant
Regular Participant

Posts : 27
Join date : 2012-07-10
Age : 26
Location : Delhi

Back to top Go down

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

Post by ankit_ashri on 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.

ankit_ashri

Posts : 4
Join date : 2012-08-13

Back to top Go down

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

Post by rosco on 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 ?

rosco
Active particpant
Active particpant

Posts : 20
Join date : 2012-04-05

Back to top Go down

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

Post by olivier verhoek on 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

olivier verhoek

Posts : 4
Join date : 2012-01-23

Back to top Go down

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

Post by sanjeetravi on Thu Aug 16, 2012 11:16 am

Can you post your complete java code here ?

sanjeetravi
Regular Participant
Regular Participant

Posts : 27
Join date : 2012-07-10
Age : 26
Location : Delhi

Back to top Go down

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

Post by olivier verhoek on 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);
}

olivier verhoek

Posts : 4
Join date : 2012-01-23

Back to top Go down

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

Post by Sponsored content Today at 10:58 am


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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