I am trying to remove part of a string made up as follows
URL_ORIGINAL = https://www.pagina.com/texto/frase_a_eliminar to leave it this way URL_FINAL = https://www.pagina.com/texto/
How can I do this?
I am trying to remove part of a string made up as follows
URL_ORIGINAL = https://www.pagina.com/texto/frase_a_eliminar to leave it this way URL_FINAL = https://www.pagina.com/texto/
How can I do this?
How can you make a dropdown button bar? such as google map
gif representing the dropdown menu action https://cdn.techjuice.pk/wp-content/uploads/2017/02/g-map.gif
If you have any ideas, it would be of great help. I leave the xml and java code of the bottom non-dropdown button bar.
The main button bar
Java
mBottomNav.setOnNavigationItemSelectedListener(new BottomNavigationView.OnNavigationItemSelectedListener() { @Override public boolean onNavigationItemSelected(@NonNull MenuItem item) { // handle desired action here // One possibility of action is to replace the contents above the nav bar // return true if you want the item to be displayed as the selected item return true; } });
XML
<android.support.design.widget.BottomNavigationView android:id="@+id/navigation" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="start" design:menu="@menu/bottom_nav_items" />
xml buttons
<menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/menu_home" android:title="@string/menu_home" android:icon="@drawable/ic_home_black" /> <item android:id="@+id/menu_search" android:title="@string/menu_search" android:icon="@drawable/ic_search_black" /> <item android:id="@+id/menu_notifications" android:title="@string/menu_notifications" android:icon="@drawable/ic_notifications_black" /> </menu>
The complete java Menu code
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
/**
* Fragment class for each nav menu item
*/
public class MenuFragment extends Fragment {
private static final String ARG_TEXT = "arg_text";
private static final String ARG_COLOR = "arg_color";
private String mText;
private int mColor;
private View mContent;
private TextView mTextView;
public static Fragment newInstance(String text, int color) {
Fragment frag = new MenuFragment();
Bundle args = new Bundle();
args.putString(ARG_TEXT, text);
args.putInt(ARG_COLOR, color);
frag.setArguments(args);
return frag;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_menu, container, false);
}
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
// retrieve text and color from bundle or savedInstanceState
if (savedInstanceState == null) {
Bundle args = getArguments();
mText = args.getString(ARG_TEXT);
mColor = args.getInt(ARG_COLOR);
} else {
mText = savedInstanceState.getString(ARG_TEXT);
mColor = savedInstanceState.getInt(ARG_COLOR);
}
// initialize views
mContent = view.findViewById(R.id.fragment_content);
mTextView = (TextView) view.findViewById(R.id.text);
// set text and background color
mTextView.setText(mText);
mContent.setBackgroundColor(mColor);
}
@Override
public void onSaveInstanceState(Bundle outState) {
outState.putString(ARG_TEXT, mText);
outState.putInt(ARG_COLOR, mColor);
super.onSaveInstanceState(outState);
}
}
java MainActivity
import android.os.Bundle;
import android.support.annotation.ColorRes;
import android.support.annotation.NonNull;
import android.support.design.widget.BottomNavigationView;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.view.MenuItem;
public class MainActivity extends AppCompatActivity {
private static final String SELECTED_ITEM = "arg_selected_item";
private BottomNavigationView mBottomNav;
private int mSelectedItem;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mBottomNav = (BottomNavigationView) findViewById(R.id.navigation);
mBottomNav.setOnNavigationItemSelectedListener(new BottomNavigationView.OnNavigationItemSelectedListener() {
@Override
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
selectFragment(item);
return true;
}
});
MenuItem selectedItem;
if (savedInstanceState != null) {
mSelectedItem = savedInstanceState.getInt(SELECTED_ITEM, 0);
selectedItem = mBottomNav.getMenu().findItem(mSelectedItem);
} else {
selectedItem = mBottomNav.getMenu().getItem(0);
}
selectFragment(selectedItem);
}
@Override
protected void onSaveInstanceState(Bundle outState) {
outState.putInt(SELECTED_ITEM, mSelectedItem);
super.onSaveInstanceState(outState);
}
@Override
public void onBackPressed() {
MenuItem homeItem = mBottomNav.getMenu().getItem(0);
if (mSelectedItem != homeItem.getItemId()) {
// select home item
selectFragment(homeItem);
} else {
super.onBackPressed();
}
}
private void selectFragment(MenuItem item) {
Fragment frag = null;
// init corresponding fragment
switch (item.getItemId()) {
case R.id.menu_home:
frag = MenuFragment.newInstance(getString(R.string.text_home),
getColorFromRes(R.color.color_home));
break;
case R.id.menu_notifications:
frag = MenuFragment.newInstance(getString(R.string.text_notifications),
getColorFromRes(R.color.color_notifications));
break;
case R.id.menu_search:
frag = MenuFragment.newInstance(getString(R.string.text_search),
getColorFromRes(R.color.color_search));
break;
}
// update selected item
mSelectedItem = item.getItemId();
// uncheck the other items.
for (int i = 0; i< mBottomNav.getMenu().size(); i++) {
MenuItem menuItem = mBottomNav.getMenu().getItem(i);
menuItem.setChecked(menuItem.getItemId() == item.getItemId());
}
updateToolbarText(item.getTitle());
if (frag != null) {
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
ft.add(R.id.container, frag, frag.getTag());
ft.commit();
}
}
private void updateToolbarText(CharSequence text) {
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
actionBar.setTitle(text);
}
}
private int getColorFromRes(@ColorRes int resId) {
return ContextCompat.getColor(this, resId);
}
}
XML ACTIVITY
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:design="http://schemas.android.com/apk/res-auto"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.segunfamisa.sample.bottomnav.MainActivity">
<FrameLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="#f1f1f1">
</FrameLayout>
<android.support.design.widget.BottomNavigationView
android:id="@+id/navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="start"
design:menu="@menu/bottom_nav_items" />
</LinearLayout>
XMLMENU
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/fragment_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.segunfamisa.sample.bottomnav.MenuFragment">
<TextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:gravity="center"
/>
</RelativeLayout>
How can I add a secondnavigation drawer
Convert the part of onCreateOptionsMenu
to anavigation drawer
public class Inicio extends AppCompatActivity
implements NavigationView.OnNavigationItemSelectedListener {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_inicio);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Snackbar.make(view, "Zona Segura", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
}
});
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
drawer.addDrawerListener(toggle);
toggle.syncState();
NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
navigationView.setNavigationItemSelectedListener(this);
}
@Override
public void onBackPressed() {
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
if (drawer.isDrawerOpen(GravityCompat.START)) {
drawer.closeDrawer(GravityCompat.START);
} else {
super.onBackPressed();
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.inicio, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.nav_camera) {
// Handle the camera action
} else if (id == R.id.nav_gallery) {
} else if (id == R.id.nav_slideshow) {
} else if (id == R.id.nav_manage) {
} else if (id == R.id.nav_share) {
} else if (id == R.id.nav_send) {
}
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
drawer.closeDrawer(GravityCompat.START);
return true;
}
@SuppressWarnings("StatementWithEmptyBody")
@Override
public boolean onNavigationItemSelected(MenuItem item) {
// Handle navigation view item clicks here.
int id = item.getItemId();
if (id == R.id.nav_camera) {
// Handle the camera action
} else if (id == R.id.nav_gallery) {
} else if (id == R.id.nav_slideshow) {
} else if (id == R.id.nav_manage) {
} else if (id == R.id.nav_share) {
} else if (id == R.id.nav_send) {
}
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
drawer.closeDrawer(GravityCompat.START);
return true;
}
}
modify this part
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.inicio, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.nav_camera) {
// Handle the camera action
} else if (id == R.id.nav_gallery) {
} else if (id == R.id.nav_slideshow) {
} else if (id == R.id.nav_manage) {
} else if (id == R.id.nav_share) {
} else if (id == R.id.nav_send) {
}
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
drawer.closeDrawer(GravityCompat.START);
return true;
}
I have the following error
E/AndroidRuntime: FATAL EXCEPTION: main
Process: shop.easy.app.x.com.x, PID: 10183
java.lang.RuntimeException: Unable to start activity ComponentInfo{shop.easy.app.x.com.x/shop.easy.app.x.com.x.Acceso}: java.lang.ClassCastException: android.support.v7.widget.AppCompatAutoCompleteTextView cannot be cast to com.rengwuxian.materialedittext.MaterialEditText
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2817)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: java.lang.ClassCastException: android.support.v7.widget.AppCompatAutoCompleteTextView cannot be cast to com.rengwuxian.materialedittext.MaterialEditText
at shop.easy.app.x.com.x.Acceso.onCreate(Acceso.java:35)
at android.app.Activity.performCreate(Activity.java:6975)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1213)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2770)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Specifically in this part
Caused by: java.lang.ClassCastException: android.support.v7.widget.AppCompatAutoCompleteTextView cannot be cast to com.rengwuxian.materialedittext.MaterialEditTextat shop.easy.app.x.com.x.Access.onCreate(Access.java:35 )
The Access Code.xml
package shop.easy.app.x.com.x;
import android.app.ProgressDialog;
import android.content.Intent;
import android.hardware.usb.UsbInterface;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
import com.rengwuxian.materialedittext.MaterialEditText;
import shop.easy.app.x.com.x.Common.Common;
import shop.easy.app.x.com.x.model.Usuario;
public class Acceso extends AppCompatActivity {
EditText edtPhone,edtPassword;
Button btnSignIn;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
edtPhone = (MaterialEditText)findViewById(R.id.edtPhone);
edtPassword = (MaterialEditText)findViewById(R.id.edtPassword);
btnSignIn = (Button)findViewById(R.id.btnSignIn);
//init firebase
final FirebaseDatabase database = FirebaseDatabase.getInstance();
final DatabaseReference table_user = database.getReference("Usuario");
btnSignIn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
final ProgressDialog mDialog = new ProgressDialog(Acceso.this);
mDialog.setMessage("Por favor espera...");
mDialog.show();
table_user.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
//comprobar si el usuario no existe en la base de datos
if (dataSnapshot.child(edtPhone.getText().toString()).exists()) {
//Informacion usuario
mDialog.dismiss();
Usuario usuario = dataSnapshot.child(edtPhone.getText().toString()).getValue(Usuario.class);
if (usuario.getContraseña().equals(edtPassword.getText().toString())) {
{
Intent homeintent = new Intent(Acceso.this,Inicio.class);
Common.currentUsuario = usuario;
startActivity(homeintent);
finish();
}
} else {
Toast.makeText(Acceso.this, "Constraseña incorrecta !!", Toast.LENGTH_SHORT).show();
}
}
else
{
mDialog.dismiss();
Toast.makeText(Acceso.this, "Usuario no registrado en base de dato", Toast.LENGTH_SHORT).show();
}
}
@Override
public void onCancelled(DatabaseError databaseError) {
}
});
}
});
}
}
xml code
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true"
android:background="@drawable/rectangulo_trans_blanco"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:paddingStart="15dp"
android:text="Usuario"
android:textColor="@color/white"
android:textSize="22sp"
android:textStyle="italic" />
<AutoCompleteTextView
android:id="@+id/edtPhone"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginBottom="15dp"
android:layout_marginEnd="15dp"
android:layout_marginStart="15dp"
android:background="@drawable/barratrasparente"
android:hint="958439457"
android:paddingStart="15dp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="15dp"
android:text="Contraseña"
android:textColor="@color/white"
android:textSize="22sp" />
<AutoCompleteTextView
android:id="@+id/edtPassword"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginBottom="15dp"
android:layout_marginEnd="15dp"
android:layout_marginStart="15dp"
android:background="@drawable/barratrasparente"
android:hint="********"
android:inputType="textPassword"
android:paddingStart="15dp"
android:layout_marginVertical="0sp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginBottom="-10sp"
android:layout_gravity="right"
android:paddingEnd="20dp"
android:text="¿Recordar Contraseña?"
android:textColor="@color/white"
android:textSize="17sp" />
<Button
android:id="@+id/btnSignIn"
android:layout_width="300dp"
android:layout_height="53dp"
android:layout_above="@+id/btnSignIn"
android:layout_centerHorizontal="true"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="10dp"
android:layout_marginTop="15dp"
android:background="@drawable/botonestilo1"
android:text="Iniciar Seción"
android:textColor="@android:color/white" />
<Button
android:id="@+id/btnSignUp"
android:layout_width="300dp"
android:layout_height="53dp"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="0dp"
android:background="@drawable/botonestilo2"
android:text="Registrarse"
android:textColor="@android:color/white" />
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="¿Olvidaste tu contraseña? restablecer aquí"
android:textColor="@color/white"
android:textSize="16sp"
android:layout_marginVertical="4dp"
android:layout_gravity="center_horizontal"/>
</LinearLayout>
</ScrollView>
I have a problem with compatibility with the following code
<style name="ExpandedAppbar" parent="@android:style/TextAppearance.Material.Title">
<item name="android:textColor">@color/colorPrimary</item>
<item name="android:textStyle">normal</item>
</style>
specifically with this part
parent="@android:style/TextAppearance.Material.Title"
Since it was implemented in API 21, do you have a replacement for API 19 that does not generate this incompatibility error.
Thank you.!!!!! c;
I have a problem using srcCompat in the following code
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin"
android:background="@android:color/white"
app:srcCompat="@drawable/ic_shopping_cart_black_24dp" />
the code with problems is
app:srcCompat="@drawable/ic_shopping_cart_black_24dp"
The error I have is:
To use VectorDrawableCompat, you need to set 'android.defaultConfig.vectorDrawables.useSupportLibrary = true'.
The beginning of the xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
also in the build.gradle I have it activated
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
vectorDrawables.useSupportLibrary = true
Why do I have the following error:
Attempt to invoke virtual method ... on a null object reference
the signIn.java is
public class SignIn extends AppCompatActivity {
EditText edtPhone,edtPassword;
Button btnSignIn;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sign_in);
edtPassword = (MaterialEditText)findViewById(R.id.edtPassword);
edtPhone = (MaterialEditText)findViewById(R.id.edtPhone);
btnSignIn = (Button)findViewById(R.id.btnSignIn);
//init firebase
final FirebaseDatabase database = FirebaseDatabase.getInstance();
final DatabaseReference table_user = database.getReference("Usuario");
btnSignIn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
final ProgressDialog mDialog = new ProgressDialog(SignIn.this);
mDialog.setMessage("Por favor espera...");
mDialog.show();
table_user.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
//comprobar si el usuario no existe en la base de datos
if (dataSnapshot.child(edtPhone.getText().toString()).exists()) {
//Informacion usuario
mDialog.dismiss();
Usuario usuario = dataSnapshot.child(edtPhone.getText().toString()).getValue(Usuario.class);
if (usuario.getContraseña().equals(edtPassword.getText().toString())) {
Toast.makeText(SignIn.this, "Inicio de Sesión Exitoso !", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(SignIn.this, "Inicio de Sesión Fallido !!", Toast.LENGTH_SHORT).show();
}
}
else
{
Toast.makeText(SignIn.this, "Usuario no registrado en base de dato", Toast.LENGTH_SHORT).show();
}
}
@Override
public void onCancelled(DatabaseError databaseError) {
}
});
}
});
}
}
The button xml code
<Button
android:id="@+id/btnSignIn1"
android:text="@string/SignIn"
android:textColor="@android:color/white"
android:background="@drawable/buttonstyle1"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_gravity="center_horizontal"
android:layout_marginTop="460dp"
/>
Thank you!!.
I have a problem and it is that when executing the following code it gives me an error
<LinearLayout
android:orientation="horizontal"
android:layout_alignParentBottom="true"
android:weightSum="2"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<info.hoang8f.widget.FButton
android:id="@+id/btnSignUp"
android:text="Iniciar seción"
android:textColor="@android:color/white"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="8dp"
app:buttonColor="@color/btnSignUp"
app:shadowColor="@android:color/black"
app:shadowEnabled="true"
app:shadowHeight="5dp"
app:cornerRadius="4dp"
/>
</LinearLayout>
[![enter the description of the image here][1]][1] therefore change the Build.gradle classpath com.android.tools.build:gradle:3.0.0
to classpath 'com.android.tools.build:gradle:2.3.3'
because in this version it works
but now the problem is that the dradle project does not synchronize since I changed the version, what can I do to solve this problem
I am new to Python and I am trying to click on the following button with HTML structure:
<div class="buttons">
<input name="ctl00$cphMain$mscSeats$tabStatus$btnDeviceMissingModal" value="Dispositivo" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$cphMain$mscSeats$tabStatus$btnDeviceMissingModal", "", true, "", "", false, false))" id="cphMain_mscSeats_tabStatus_btnDeviceMissingModal" class="modal btnRed border-radius cboxElement" href="#pnlReportMissingConfirm" type="submit">
</div>
I tried using the following code:
element = driver.find_element_by_xpath("//input[@name='ctl00$cphMain$mscSeats$tabStatus$btnDeviceMissingModal']")
element.click()