1

I am trying to run below object but I am getting an error.

$fr = New-Object -ComObject firefox.Application

I am getting below error.

retrieving the com class factory for component with clsid

But I successed with below command

$fr = New-Object -ComObject InternetExplorer.Application
Ansgar Wiechers
  • 193,178
  • 25
  • 254
  • 328
DKU
  • 77
  • 1
  • 7

3 Answers3

0

Firefox doesn't expose a COM object like Internet Explorer does. You can't automate Firefox (Chrome, Opera, any browser other than IE) that way.

Ansgar Wiechers
  • 193,178
  • 25
  • 254
  • 328
0

To add to the solution, if you want to automate Firefox you need to use something like Watin. It is not supported out of the box.

Check this SO question for details: Automating Firefox and Chrome browsers

You can find Watin here: Official Watin Site

Community
  • 1
  • 1
Aman Sharma
  • 1,930
  • 1
  • 17
  • 31
0

a = int(input("Please enter the price of onion = "))

if (a<=10): print("Bring 5kg")

else (20>=a<=11): print("bring 2kg")

print("Don't buy come back to home")

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Feb 17 '22 at 14:29