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
TurtleRock
Posts : 8
Join date : 2012-05-16

Descriptivce Programming(Similar to VBS in QTP) in webdriver. Empty Descriptivce Programming(Similar to VBS in QTP) in webdriver.

Mon Jul 09, 2012 7:47 pm
Is it possible to write descriptivce programming(Similar to VBS in QTP) in webdriver.
avatar
tarun3kumar
Master
Master
Posts : 186
Join date : 2012-02-14
http://seleniumtests.com

Descriptivce Programming(Similar to VBS in QTP) in webdriver. Empty Re: Descriptivce Programming(Similar to VBS in QTP) in webdriver.

Tue Jul 10, 2012 12:54 pm
You in fact write descriptive programming with wrapping your common code. There is no QTP kind of object repo in Selenium
avatar
TurtleRock
Posts : 8
Join date : 2012-05-16

Descriptivce Programming(Similar to VBS in QTP) in webdriver. Empty Re: Descriptivce Programming(Similar to VBS in QTP) in webdriver.

Wed Jul 11, 2012 6:54 pm
Yes that is correct, we dont have any Object repo in selenium. But what i need to know is can we write a set of code like in QTP(VBS) to navigate through all the TextBoxes availabel on page, chech property of all and select the appropriate one for entering values in it.

VBS Code for example:

set odesc =Descripton.create()

odesc("class").value ="TextBox"

set obj = Browser("Google").childobjects(odesc)

Can we write similar kind of coding in selenium web driver.
avatar
tarun3kumar
Master
Master
Posts : 186
Join date : 2012-02-14
http://seleniumtests.com

Descriptivce Programming(Similar to VBS in QTP) in webdriver. Empty Re: Descriptivce Programming(Similar to VBS in QTP) in webdriver.

Thu Jul 12, 2012 12:24 pm
indeed you can by collecting all Web Elelments in a java (or C#, php, python etc ) collection and iterating through it -

Code:
List<WebElement>checkboxes = driver.findElements(By.id("id"));
for(WebElement checkbox:checkboxes) {
    checkbox.click()
    // and do some thing more with check box element.
}

Does this help?
Sponsored content

Descriptivce Programming(Similar to VBS in QTP) in webdriver. Empty Re: Descriptivce Programming(Similar to VBS in QTP) in webdriver.

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