everyone. First, excuse me for my bad English. I will try to go a specific URL but just the browser its open.

This is my code 1 file:

from selenium import webdriver

class Objects:
    def __init__(self):
        self.driver = webdriver.Firefox()

    def open_page(self, url):
        return self.driver.get(url)

And in my second file I have:

from Objects.pom import Objects

driver = Objects()
base_url = {
    'eci_es' : 'url1',
    'eci_pt' : 'url2',
    'nw_back_rc' : 'url3',
    'wm_back_rc' : 'url4'

def login():

But just the browser it's open.

I will try to use POM


When you call driver = Objects(), it will instantiate the browser (self.driver = webdriver.Firefox()).

But on the second script you just define a function that will call driver.open_page. You will need to call the function itself.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.