n3wbie

Webdriver UDF(based On External Exe)

11 posts in this topic

#1 ·  Posted (edited)

Please Spare me for errors

M totally Raw At programming stuffs So please forgive me

Coming to udf 

Why was it required: Udf Already Available had to start with an extension and ws a bit tricky to be used also it was a bit obsolute

What Are Functionalities of new udf: not much but a better way of interacting and userfriendliness, using external exe which can workaround with many other browsers

Requirements: Chromedriver.exe(available freely)(Chrome)(Please Use version 2.28 as further versions/Previous versions sometime create problems)

                             Geckodriver.exe(available freely)(Mozilla FF)There are some problems with this version m working to resolve same and make udf work with both browsers

                             JSON UDF 

                             Browserudf.au3

Example Script For facebook Login Quite Simple to use

#Include <browserudf.au3>
$id=Browser_Setings(9515,"D:\Desktop\Vinfur\chromedriver.exe")
$session=Browser_create_session()
Browser_openurl($session,"https://www.facebook.com/")
$element=Browser_getelement($session,"name","email")
browser_setelement($session,$element,"Username type here")
$element=Browser_getelement($session,"id","pass")
browser_setelement($session,$element,"Password")
$element=Browser_getelement($session,"id","u_0_r")
browser_actions_click($session,$element)
Browser_Setings_close($id)

 

I Know There are thousands of bugs so please go on correcting me so that i will improve and also udf

And Also Sorry that i didnt make any error checking mechanism for any function

but as i couldnt get all errors listed/documented anywhere so i will update it as we go ahead

and one more thanks to 

 

Edited by n3wbie
Updated UDF Errors

Share this post


Link to post
Share on other sites



#3 ·  Posted

3 minutes ago, argumentum said:

Would you give examples on how to use this ?. Thanks for sharing.

Yes sure,

Even there are some more functions to be added and some bugs fixes

I ll update the same with examples

Thanks for suggesting

1 person likes this

Share this post


Link to post
Share on other sites

#5 ·  Posted

7 hours ago, junkew said:

Good start. Maybe mix with edge webdriver examples. See 

 

Mostly my functions will work with edge also

I do t have edgeso some one could check after i post example

Share this post


Link to post
Share on other sites

#7 ·  Posted

13 minutes ago, junkew said:

As you use webdriver concept maybe suggestion to rename to webdriver.au3 as there are also drivers for non browsers

https://github.com/Microsoft/WinAppDriver

 

Should i change function names even?

Please suggest

Share this post


Link to post
Share on other sites

#8 ·  Posted

I would suggest yes, change the function names.

 

 

 

Share this post


Link to post
Share on other sites

#9 ·  Posted

1 hour ago, junkew said:

I would suggest yes, change the function names.

 

 

 

I First Had Plan to implement Full But Than Dropped as there are so many versions of drivers and response are a bit different to sort for result

like chrome driver gives direct session in main json obj while geckodriver gives in as value->session

Making it complaint to all was not possible so even i dropped idea of using full json and wherever required i switched to using stringregex()

Also webdriver implementation is getting updated and many a times functions are getting changed 

like session/sessionid/execute was dropped and instead /execute/sync was formed 

now some drivers are having this implementation while some use old

also some capabilities arent well implemented in some drivers like wise other may work flawless

So basically my main aim was to provide a basic start to community using webdriver concept.Also Keeping in Mind that maximum may get benefit(in terms of drivers)

Currently m working it to keep it in line for basic operations (ie navigation and get source)

Once I Solve and inline with both webdriver along with error checking mechanism we will take up more .

i will take advise and change its name to webdriver and all functions here after will be named as webdriver_function names

May b in future someone can take them further if not me.

Share this post


Link to post
Share on other sites

#10 ·  Posted

On 7/10/2017 at 3:51 PM, junkew said:

I would suggest yes, change the function names.

 

 

 

Updated Example Script Have A look

Share this post


Link to post
Share on other sites

#11 ·  Posted

On 7/9/2017 at 9:53 PM, argumentum said:

Would you give examples on how to use this ?. Thanks for sharing.

Updated it to work with mozilla ff and chrome and most probably with all other drivers

Example Script Updated in first post would like you to test same. Extremely sorry for delay

please update me for other issue

3 people like this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now