Jump to content
UBot Underground

Am I Up The Creek Without A Paddle?


Recommended Posts

I need to access webRTC on a site.

 

So, I need ExBrowser (for access to Chrome/Firefox), but it's not for sale, for about 6-12 months...

 

Any other workarounds?

 

Only thing I can think of is trying to control a desktop install of Chrome... (I've never tried to control desktop software yet).

 

Thoughts ideas/suggestions... ?

 

I appreciate it.

Link to post
Share on other sites

Update:

 

So far I've been able to select the Chrome browser, but not much after that.

 

Problems:

 

- Multiple tabs are launched.

- Some how my keyboard now doesn't work like it should. Pressing keys doesn't perform as expected. *

 

* I think this is due to the fact that I was trying to have the bot press CTRL+A and then Delete. Something must still be sticking...

 

Even closing uBot and Chrome, then relauching them problem still persisted. I'm rebooting windows 7 now, I'm on my MAC side. :)

Link to post
Share on other sites

Hi,

 

Python is free and so is selenium

 

google python selenium

 

In the python forum I show how to use python through ubot's ironpython or you can use TJ's Execute Python plugin.

 

Then download the drivers FF(geckodriver)/Chrome. Add them to your "PATH"

 

Download python and install selenium.

And/or hire me to help you understand all that better.

here's some demo code

from selenium import webdriver
from time import sleep
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary

# path to FF .exe
ff_binary = r'C:\Program Files (x86)\Mozilla Firefox\firefox.exe'

# path to ff driver
web_drivers = r'C:\webdrivers\geckodriver.exe'

# starts an instance of webdriver and names it ff_browser
ff_browser = webdriver.Firefox(firefox_binary=ff_binary, executable_path=web_drivers)
ff_browser.get('http://httpbin.org/forms/post')

# wait for elements to appear before execution of scripts
ff_browser.implicitly_wait(10000)  # milliseconds
#  https://www.youtube.com/watch?v=EiCSZ_qZuVI

customer_name = ff_browser.find_element_by_name('custname')
customer_name.send_keys('Code Docta Nick')

custTel = ff_browser.find_element_by_xpath("//input[@name='custtel']")
custTel.send_keys('111-867-5309')

email = ff_browser.find_element_by_name('custemail')
email.send_keys('codedocta@gmail.com')

pizzaSize = ff_browser.find_element_by_xpath("//input[@value='medium']")
pizzaSize.click()

baconTop = ff_browser.find_element_by_xpath("//input[@value='bacon']")
baconTop.click()

cheeseTop = ff_browser.find_element_by_xpath("//input[@value='cheese']")
cheeseTop.click()

delivery =  ff_browser.find_element_by_xpath("//input[@name='delivery']")
delivery.send_keys('17:00')

comments = ff_browser.find_element_by_name('comments')
comments.send_keys('I like to eat pizza!!')

sub_button = ff_browser.find_element_by_xpath('//button')
sub_button.click()

sleep(200)

ff_browser.close()
ff_browser.quit()


Chrome is similar.

 

Regards,
Nick

 

  • Like 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...